DomainAttribute Class | Apache log4net™ SDK Documentation

Note: This API is now obsolete.

Assembly level attribute that specifies the logging domain for the assembly.
Inheritance Hierarchy

System
Object
System
Attribute
log4net.Config
RepositoryAttribute
log4net.Config
DomainAttribute

Namespace: log4net.Config
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    [SerializableAttribute]
    [ObsoleteAttribute("Use RepositoryAttribute instead of DomainAttribute")]
    public sealed class DomainAttribute : RepositoryAttribute

    <SerializableAttribute>
    <ObsoleteAttribute("Use RepositoryAttribute instead of DomainAttribute")>
    Public NotInheritable Class DomainAttribute
    	Inherits RepositoryAttribute

    [SerializableAttribute]
    [ObsoleteAttribute(L"Use RepositoryAttribute instead of DomainAttribute")]
    public ref class DomainAttribute sealed : public RepositoryAttribute

    [<SealedAttribute>]
    [<SerializableAttribute>]
    [<ObsoleteAttribute("Use RepositoryAttribute instead of DomainAttribute")>]
    type DomainAttribute =
        class
            inherit RepositoryAttribute
        end

The DomainAttribute type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| DomainAttribute | Initializes a new instance of the DomainAttribute class.
| DomainAttribute(String) | Initialize a new instance of the DomainAttribute class with the name of the domain.

Top
Properties

| Name | Description
--- | --- | ---
| Name | Gets or sets the name of the logging repository. (Inherited from RepositoryAttribute.)
| RepositoryType | Gets or sets the type of repository to create for this assembly. (Inherited from RepositoryAttribute.)
| TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)

Top
Methods

| Name | Description
--- | --- | ---
| Equals | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
| GetHashCode | Returns the hash code for this instance. (Inherited from Attribute.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| IsDefaultAttribute | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
| Match | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
| ToString | Returns a String that represents the current Object. (Inherited from Object.)

Top
Remarks

DomainAttribute is obsolete. Use RepositoryAttribute instead of DomainAttribute.

Assemblies are mapped to logging domains. Each domain has its own logging repository. This attribute specified on the assembly controls the configuration of the domain. The Name property specifies the name of the domain that this assembly is a part of. The RepositoryType specifies the type of the repository objects to create for the domain. If this attribute is not specified and a Name is not specified then the assembly will be part of the default shared logging domain.

This attribute can only be specified on the assembly and may only be used once per assembly.

See Also

#### Reference

log4net.Config Namespace