Table of Contents

Class BasicCustomTraceListenerData

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging.Configuration
Assembly
Microsoft.Practices.EnterpriseLibrary.Logging.dll

Base configuration object for custom TraceListeners.

public abstract class BasicCustomTraceListenerData : TraceListenerData, IHelperAssistedCustomConfigurationData<BasicCustomTraceListenerData>, ICustomProviderData
Inheritance
BasicCustomTraceListenerData
Implements
IHelperAssistedCustomConfigurationData<BasicCustomTraceListenerData>
ICustomProviderData
Derived
Inherited Members

Constructors

BasicCustomTraceListenerData()

Initializes a new instance of the BasicCustomTraceListenerData with default values.

public BasicCustomTraceListenerData()

BasicCustomTraceListenerData(string, string, string)

Initializes a new instance of the BasicCustomTraceListenerData with name, fully qualified type name and initial information.

public BasicCustomTraceListenerData(string name, string typeName, string initData)

Parameters

name string

The name for the represented TraceListener.

typeName string

The fully qualified type name of the represented TraceListener.

initData string

The initialization information for the represented TraceListener.

BasicCustomTraceListenerData(string, string, string, TraceOptions)

Initializes a new instance of the BasicCustomTraceListenerData with name, fully qualified type name, initial information, and TraceOptions output options.

public BasicCustomTraceListenerData(string name, string typeName, string initData, TraceOptions traceOutputOptions)

Parameters

name string

The name for the represented TraceListener.

typeName string

The fully qualified type name of the represented TraceListener.

initData string

The initialization information for the represented TraceListener.

traceOutputOptions TraceOptions

The TraceOptions output options.

BasicCustomTraceListenerData(string, Type, string)

Initializes a new instance of the BasicCustomTraceListenerData with name, type and initial information.

public BasicCustomTraceListenerData(string name, Type type, string initData)

Parameters

name string

The name for the represented TraceListener.

type Type

The Type of the represented TraceListener.

initData string

The initialization information for the represented TraceListener.

BasicCustomTraceListenerData(string, Type, string, TraceOptions)

Initializes a new instance of the BasicCustomTraceListenerData with name, type, initial information, and TraceOptions output options.

public BasicCustomTraceListenerData(string name, Type type, string initData, TraceOptions traceOutputOptions)

Parameters

name string

The name for the represented TraceListener.

type Type

The Type of the represented TraceListener.

initData string

The initialization information for the represented TraceListener.

traceOutputOptions TraceOptions

The TraceOptions output options.

Properties

Attributes

Gets the custom configuration attributes.

public NameValueCollection Attributes { get; }

Property Value

NameValueCollection

InitData

Gets or sets the initialization data.

public string InitData { get; set; }

Property Value

string

Properties

Gets a System.Configuration.ConfigurationPropertyCollection of the properties that are defined for this configuration element when implemented in a derived class.

protected override ConfigurationPropertyCollection Properties { get; }

Property Value

ConfigurationPropertyCollection

A System.Configuration.ConfigurationPropertyCollection of the properties that are defined for this configuration element when implemented in a derived class.

Methods

CoreBuildTraceListener(LoggingSettings)

Builds the TraceListener object represented by this configuration object.

protected override TraceListener CoreBuildTraceListener(LoggingSettings settings)

Parameters

settings LoggingSettings

The logging configuration settings.

Returns

TraceListener

A trace listener.

CreateHelper()

Creates the helper that enapsulates the configuration properties management.

protected virtual CustomProviderDataHelper<BasicCustomTraceListenerData> CreateHelper()

Returns

CustomProviderDataHelper<BasicCustomTraceListenerData>

IsModified()

Indicates whether this configuration element has been modified since it was last saved or loaded when implemented in a derived class.

protected override bool IsModified()

Returns

bool

true if the element has been modified; otherwise, false.

OnDeserializeUnrecognizedAttribute(string, string)

Called when an unknown attribute is encountered while deserializing the SystemDiagnosticsTraceListenerData object.

protected override bool OnDeserializeUnrecognizedAttribute(string name, string value)

Parameters

name string

The name of the unrecognized attribute.

value string

The value of the unrecognized attribute.

Returns

bool

true if the processing of the element should continue; otherwise, false.

Reset(ConfigurationElement)

Resets the internal state of the SystemDiagnosticsTraceListenerData object, including the locks and the properties collection.

protected override void Reset(ConfigurationElement parentElement)

Parameters

parentElement ConfigurationElement

The parent element.

SetAttributeValue(string, string)

Sets the attribute value for a key.

public void SetAttributeValue(string key, string value)

Parameters

key string

The attribute name.

value string

The attribute value.

Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

Modifies the SystemDiagnosticsTraceListenerData object to remove all values that should not be saved.

protected override void Unmerge(ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)

Parameters

sourceElement ConfigurationElement

A System.Configuration.ConfigurationElement object at the current level containing a merged view of the properties.

parentElement ConfigurationElement

A parent System.Configuration.ConfigurationElement object or null if this is the top level.

saveMode ConfigurationSaveMode

One of the System.Configuration.ConfigurationSaveMode values.