Share via


ConfigurationNameMapperAttribute Class

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Specifies what type to use to map instance names for the type this attribute is bound to. This class cannot be inherited.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder
Assembly:  Microsoft.Practices.EnterpriseLibrary.Common (in Microsoft.Practices.EnterpriseLibrary.Common.dll)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Interface, AllowMultiple := False,  _
    Inherited := False)> _
PublicNotInheritableClassConfigurationNameMapperAttribute _
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = false, 
    Inherited = false)]
publicsealedclassConfigurationNameMapperAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Interface, AllowMultiple = false, 
    Inherited = false)]
publicref classConfigurationNameMapperAttributesealed : public Attribute
publicfinalclass ConfigurationNameMapperAttribute extends Attribute

Remarks

This attribute is used when building objects through ObjectBuilder. The ConfigurationNameMappingStrategy will query the requested type for this attribute, and will use an instance of the specified mapper type to map the instance name when necessary. The specified type must implement the IConfigurationNameMapper interface. The attribute needs to be bound only to the types that will be requested to ObjectBuilder that might need instance name mappings; it is not necessary to bind the attribute to subclasses or implementations of interfaces.

Inheritance Hierarchy

System.Object
  System.Attribute
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMapperAttribute

See Also

ConfigurationNameMapperAttribute Members

Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder Namespace

Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.IConfigurationNameMapper

Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy

Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.