PluginAttribute Class | Apache log4net™ SDK Documentation

Assembly level attribute that specifies a plugin to attach to the repository.
Inheritance Hierarchy

System
Object
System
Attribute
log4net.Config
PluginAttribute

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

C#
VB
C++
F#
Copy

    [SerializableAttribute]
    public sealed class PluginAttribute : Attribute,
    	IPluginFactory

    <SerializableAttribute>
    Public NotInheritable Class PluginAttribute
    	Inherits Attribute
    	Implements IPluginFactory

    [SerializableAttribute]
    public ref class PluginAttribute sealed : public Attribute,
    	IPluginFactory

    [<SealedAttribute>]
    [<SerializableAttribute>]
    type PluginAttribute =
        class
            inherit Attribute
            interface IPluginFactory
        end

The PluginAttribute type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| PluginAttribute(String) | Initializes a new instance of the PluginAttribute class with the specified type.
| PluginAttribute(Type) | Initializes a new instance of the PluginAttribute class with the specified type.

Top
Properties

| Name | Description
--- | --- | ---
| Type | Gets or sets the type for the plugin.
| TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
| TypeName | Gets or sets the type name for the plugin.

Top
Methods

| Name | Description
--- | --- | ---
| CreatePlugin | Creates the plugin object defined by this attribute.
| 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 representation of the properties of this object. (Overrides Object ToString .)

Top
Remarks

Specifies the type of a plugin to create and attach to the assembly's repository. The plugin type must implement the IPlugin interface.

See Also

#### Reference

log4net.Config Namespace