Share via


SendToDatabaseListenerExtensions.Database Method

Adds a new FormattedDatabaseTraceListener to the logging settings and creates a reference to this Trace Listener for the current category source.

Namespace: Microsoft.Practices.EnterpriseLibrary.Common.Configuration
Assembly: Microsoft.Practices.EnterpriseLibrary.Logging.Database (in Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll) Version: 6.0.0.0 (6.0.1304.0)

Syntax

public static ILoggingConfigurationSendToDatabaseTraceListener Database(
    this ILoggingConfigurationSendTo context,
    string listenerName
)
'Declaration
<ExtensionAttribute> 
Public Shared Function Database ( 
    context As ILoggingConfigurationSendTo,
    listenerName As String
) As ILoggingConfigurationSendToDatabaseTraceListener
public:
[ExtensionAttribute]
static ILoggingConfigurationSendToDatabaseTraceListener^ Database(
    ILoggingConfigurationSendTo^ context, 
    String^ listenerName
)

Parameters

Return Value

Type: ILoggingConfigurationSendToDatabaseTraceListener
Fluent interface that can be used to further configure the created FormattedDatabaseTraceListenerData.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ILoggingConfigurationSendTo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

SendToDatabaseListenerExtensions Class

SendToDatabaseListenerExtensions Members

Microsoft.Practices.EnterpriseLibrary.Common.Configuration Namespace

Microsoft.Practices.EnterpriseLibrary.Logging.Database.FormattedDatabaseTraceListener

Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData