Table of Contents

Class CustomLogFilterData

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

Configuration data for custom log filters.

public class CustomLogFilterData : LogFilterData, IHelperAssistedCustomConfigurationData<CustomLogFilterData>, ICustomProviderData
Inheritance
CustomLogFilterData
Implements
IHelperAssistedCustomConfigurationData<CustomLogFilterData>
ICustomProviderData

Constructors

CustomLogFilterData()

Initializes with default values.

public CustomLogFilterData()

CustomLogFilterData(string, string)

Initializes with name and fully qualified name of the provider type.

public CustomLogFilterData(string name, string typeName)

Parameters

name string
typeName string

CustomLogFilterData(string, Type)

Initializes with name and provider type.

public CustomLogFilterData(string name, Type type)

Parameters

name string
type Type

Properties

Attributes

Gets or sets custom configuration attributes.

public NameValueCollection Attributes { get; }

Property Value

NameValueCollection

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.

TypeName

Overridden in order to apply BrowsableAttribute.

[Browsable(true)]
public override string TypeName { get; set; }

Property Value

string

Methods

BuildFilter()

Builds the ILogFilter object represented by this configuration object.

public override ILogFilter BuildFilter()

Returns

ILogFilter

A filter.

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 CustomLogFilterData 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 CustomLogFilterData 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 CustomLogFilterData 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.