Class BasicCustomTraceListenerData
- 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
stringThe name for the represented TraceListener.
typeName
stringThe fully qualified type name of the represented TraceListener.
initData
stringThe 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
stringThe name for the represented TraceListener.
typeName
stringThe fully qualified type name of the represented TraceListener.
initData
stringThe initialization information for the represented TraceListener.
traceOutputOptions
TraceOptionsThe 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
stringThe name for the represented TraceListener.
type
TypeThe Type of the represented TraceListener.
initData
stringThe 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
stringThe name for the represented TraceListener.
type
TypeThe Type of the represented TraceListener.
initData
stringThe initialization information for the represented TraceListener.
traceOutputOptions
TraceOptionsThe TraceOptions output options.
Properties
Attributes
Gets the custom configuration attributes.
public NameValueCollection Attributes { get; }
Property Value
InitData
Gets or sets the initialization data.
public string InitData { get; set; }
Property Value
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
LoggingSettingsThe 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
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
stringThe name of the unrecognized attribute.
value
stringThe value of the unrecognized attribute.
Returns
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
ConfigurationElementThe parent element.
SetAttributeValue(string, string)
Sets the attribute value for a key.
public void SetAttributeValue(string key, string value)
Parameters
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
ConfigurationElementA System.Configuration.ConfigurationElement object at the current level containing a merged view of the properties.
parentElement
ConfigurationElementA parent System.Configuration.ConfigurationElement object or null if this is the top level.
saveMode
ConfigurationSaveModeOne of the System.Configuration.ConfigurationSaveMode values.