Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Runtime.​InteropServices.​ComAwareEventInfo

Assembly: System.Runtime.InteropServices

Inheritance: object → Reflection.MemberInfoReflection.EventInfo → ComAwareEventInfo

Permits late-bound registration of an event handler.

Properties

Attributes
Gets the attributes for this event.
public Type
DeclaringType
Gets the class that declares this member.
public int
MetadataToken
Gets the metadata token associated with the current <see cref="T:System.Runtime.InteropServices.ComAwareEventInfo" /> object.
Module
Gets the module associated with the current <see cref="T:System.Runtime.InteropServices.ComAwareEventInfo" /> object.
public string
Name
Gets the name of the current member.
public Type
ReflectedType
Gets the class object that was used to initialize this instance.
AddMethod
public Type
EventHandlerType
public bool
IsMulticast
public bool
IsSpecialName
MemberType
RaiseMethod
RemoveMethod
CustomAttributes
public bool
IsCollectible

Methods

public void
AddEventHandler​(object target, delegate handler)
target The target object that the event delegate should bind to.
handler The event delegate.
Attaches an event handler to a COM object.
GetAddMethod​(bool nonPublic)
nonPublic <see langword="true" /> to return non-public methods; otherwise, <see langword="false" /> .
Returns The method that was used to add an event handler delegate to the event source.
Gets the method that was used to add an event handler delegate to the event source.
public object[]
GetCustomAttributes​(bool inherit)
inherit <see langword="true" /> to search this member's inheritance chain to find the attributes; otherwise, <see langword="false" /> .
Returns An array that contains all the custom attributes, or an array that has no elements if no attributes were defined.
When overridden in a derived class, gets an array that contains all the custom attributes that are applied to this member.
public object[]
GetCustomAttributes​(Type attributeType, bool inherit)
attributeType The attribute type to search for. Only attributes that are assignable to this type can be returned.
inherit <see langword="true" /> to search this member's inheritance chain to find the attributes; otherwise, <see langword="false" /> .
Returns An array that contains all the custom attributes of the specified type, or an array that has no elements if no attributes were defined.
When overridden in a derived class, gets an array that contains all the custom attributes of the specified type that are applied to this member.
GetCustomAttributesData​()
Returns A generic list of <see cref="T:System.Reflection.CustomAttributeData" /> objects representing data about the attributes that have been applied to the current <see cref="T:System.Runtime.InteropServices.ComAwareEventInfo" /> .
Returns a list of <see cref="T:System.Reflection.CustomAttributeData" /> objects for the current <see cref="T:System.Runtime.InteropServices.ComAwareEventInfo" /> .
public Reflection.​MethodInfo[]
GetOtherMethods​(bool nonPublic)
nonPublic <see langword="true" /> to include non-public methods; otherwise, <see langword="false" /> .
Returns An array representing the methods that have been associated with the event in metadata. If there are no such methods, an empty array is returned.
Returns the public or non-public methods that have been associated with an event in metadata.
GetRaiseMethod​(bool nonPublic)
nonPublic <see langword="true" /> to return non-public methods; otherwise, <see langword="false" /> .
Returns The object that was called when the event was raised.
When overridden in a derived class, returns the method that was called when the event was raised.
GetRemoveMethod​(bool nonPublic)
nonPublic <see langword="true" /> to return non-public methods; otherwise, <see langword="false" /> .
Returns The method that was used to remove an event handler delegate from the event source.
When overridden in a derived class, retrieves the <see cref="T:System.Reflection.MethodInfo" /> object for removing a method of the event.
public bool
IsDefined​(Type attributeType, bool inherit)
attributeType The attribute type to search for.
inherit <see langword="true" /> to search this member's inheritance chain to find the attributes; otherwise, <see langword="false" /> .
Returns <see langword="true" /> if the specified attribute has been applied to this member; otherwise, <see langword="false" /> .
Indicates whether one or more instances of the specified attribute are applied to this member.
public void
RemoveEventHandler​(object target, delegate handler)
target The target object that the event delegate is bound to.
handler The event delegate.
Detaches an event handler from a COM object.
public bool
Equals​(object obj)
Inherited from EventInfo
GetAddMethod​()
Inherited from EventInfo
public int
GetHashCode​()
Inherited from EventInfo
public Reflection.​MethodInfo[]
GetOtherMethods​()
Inherited from EventInfo
GetRaiseMethod​()
Inherited from EventInfo
GetRemoveMethod​()
Inherited from EventInfo
public bool
HasSameMetadataDefinitionAs​(Reflection.MemberInfo other)
Inherited from MemberInfo
protected void
Finalize​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object