Represents a custom attribute (CustomAttribute).
Namespace:
PostSharp.CodeModelAssembly: PostSharp.Core (in PostSharp.Core.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public NotInheritable Class CustomAttributeDeclaration _ Inherits MetadataDeclaration _ Implements IWriteILDefinition, ICustomAttributeInstance, ICustomAttributeValue, IRemoveable, _ IMetadataDeclaration, IDeclaration, IElement, IModuleScoped, ITaggable |
| C# |
|---|
public sealed class CustomAttributeDeclaration : MetadataDeclaration, IWriteILDefinition, ICustomAttributeInstance, ICustomAttributeValue, IRemoveable, IMetadataDeclaration, IDeclaration, IElement, IModuleScoped, ITaggable |
| Visual C++ |
|---|
public ref class CustomAttributeDeclaration sealed : public MetadataDeclaration, IWriteILDefinition, ICustomAttributeInstance, ICustomAttributeValue, IRemoveable, IMetadataDeclaration, IDeclaration, IElement, IModuleScoped, ITaggable |
Remarks
Any MetadataDeclaration can have custom attributes. They are exposed on the CustomAttributes property.
If you change any member of an instance of CustomAttributeDeclaration, you have to call the InvalidateSerialization()()() to force the custom attribute to be serialized again.
Inheritance Hierarchy
System..::.Object
PostSharp.CodeModel..::.Element
PostSharp.CodeModel..::.Declaration
PostSharp.CodeModel..::.MetadataDeclaration
PostSharp.CodeModel..::.CustomAttributeDeclaration
PostSharp.CodeModel..::.Element
PostSharp.CodeModel..::.Declaration
PostSharp.CodeModel..::.MetadataDeclaration
PostSharp.CodeModel..::.CustomAttributeDeclaration