PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Event­Declaration Class

EventDeclaration Class

Represents an event (Event).
Inheritance Hierarchy

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public sealed class EventDeclaration : MethodGroupDeclaration, 
	IRemovable, IMetadataDeclaration, IDeclaration, IElement, IModuleElement, 
	ITaggable, IWriteReflectionName

The EventDeclaration type exposes the following members.

Constructors
  NameDescription
Public methodEventDeclaration
Initializes a new instance of the EventDeclaration class
Properties
  NameDescription
Public propertyAttributes
Gets or sets the event attributes.
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyDeclaringType
Gets the parent TypeDefDeclaration.
(Inherited from MethodGroupDeclaration.)
Public propertyEventType
Gets or sets the type of the event handler.
Public propertyIsOriginal
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.)
Public propertyIsStatic
Determines whether the current member is static.
(Inherited from MethodGroupDeclaration.)
Public propertyMetadataToken
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.)
Public propertyName
Gets or sets the name of the current declaration.
(Inherited from NamedMetadataDeclaration.)
Public propertyOrdinal (Inherited from NamedPositionedMetadataDeclaration.)
Public propertyOriginalDeclaration
When the declaration represents another declaration in the source assembly, this property refers to this declaration. When using GetReflectionObject(Type[], Type[], BindingOptions), the original declaration should actually be retrieved.
(Inherited from MetadataDeclaration.)
Public propertyOriginalName (Inherited from NamedMetadataDeclaration.)
Public propertyParentMember
Gets the parent member of the current declaration.
(Inherited from MethodGroupDeclaration.)
Public propertyParentType
Gets the parent type of the current declaration.
(Inherited from MethodGroupDeclaration.)
Public propertyVisibility
Gets the visibility of the current element.
(Inherited from MethodGroupDeclaration.)
Methods
  NameDescription
Public methodClearCache
Clear the cache (typically mapping to System.Reflection or, if the current element is a reference, to the related definition) of the current Element and all its children.
(Overrides Element.ClearCache().)
Public methodDispose Obsolete. (Inherited from MetadataDeclaration.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetAccessor
Gets an accessor method.
(Inherited from MethodGroupDeclaration.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetSystemEvent()
Gets the system runtime event corresponding to the current event.
Public methodGetSystemEvent(BindingOptions)
Gets a reflection EventInfo that wraps the current event.
Public methodGetTag<T>
Gets a tag associated with the current declaration.
(Inherited from MetadataDeclaration.)
Public methodGetTokenType
Gets the TokenType of the derived declaration.
(Overrides MetadataDeclaration.GetTokenType().)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRemove
Remove the current declaration from its parent.
Public methodSetTag<T>
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.)
Public methodToString (Inherited from MethodGroupDeclaration.)
Public methodWriteReflectionName(StringBuilder, ReflectionNameOptions)
Writes the name of the current declaration to a StringBuilder.
Public methodWriteReflectionName(StringBuilder, ReflectionNameOptions, NameMapper)
Writes the name of the current declaration to a StringBuilder and specifies a NameMapper.
(Overrides MethodGroupDeclaration.WriteReflectionName(StringBuilder, ReflectionNameOptions, NameMapper).)
Extension Methods
  NameDescription
Public Extension MethodGetDisplayName
Gets the name of a given declaration as it should be displayed to the user.
(Defined by WriteReflectionNameExtensions.)
Public Extension MethodGetReflectionName()Overloaded.
Gets the name of a given declaration and returns a string that is compatible with the result of the ToString method of system reflection objects.
(Defined by WriteReflectionNameExtensions.)
Public Extension MethodGetReflectionName(ReflectionNameOptions)Overloaded.
Gets the name of a given declaration and returns a string that is compatible with the result of the ToString method of system reflection objects.
(Defined by WriteReflectionNameExtensions.)
Public Extension MethodGetReflectionName(ReflectionNameOptions, NameMapper)Overloaded.
Gets the name of a given declaration, constructed using given options.
(Defined by WriteReflectionNameExtensions.)
Remarks
Events are owned by types (TypeDefDeclaration) and are exposed on the Events property.
See Also