ComAwareEventInfo ComAwareEventInfo ComAwareEventInfo ComAwareEventInfo Class

Definition

Warning

This API is now obsolete.

Permits late-bound registration of an event handler.

public ref class ComAwareEventInfo : System::Reflection::EventInfo
[System.Obsolete("ComAwareEventInfo may be unavailable in future releases.")]
public class ComAwareEventInfo : System.Reflection.EventInfo
type ComAwareEventInfo = class
    inherit EventInfo
Public Class ComAwareEventInfo
Inherits EventInfo
Inheritance
ComAwareEventInfoComAwareEventInfoComAwareEventInfoComAwareEventInfo
Attributes

Remarks

Normally, compilers will automatically embed calls to the ComAwareEventInfo.AddEventHandler(Object, Delegate) and ComAwareEventInfo.RemoveEventHandler(Object, Delegate) methods instead of using regular add handler and remove handler methods for events. This occurs if the interface that the corresponding event is defined on needs to be embedded.

You can specify this by embedding the entire assembly that contains the interface by using the /link option on the compilers or by setting the Embed Interop Types property to True in Visual Studio.

The ComAwareEventInfo type derives from the EventInfo class and overrides the EventInfo.AddEventHandler(Object, Delegate) and EventInfo.RemoveEventHandler(Object, Delegate) methods.

Constructors

ComAwareEventInfo(Type, String) ComAwareEventInfo(Type, String) ComAwareEventInfo(Type, String) ComAwareEventInfo(Type, String)

Initializes a new instance of the ComAwareEventInfo class by using the specified type and a name of the event on the type.

Properties

AddMethod AddMethod AddMethod AddMethod

Gets the MethodInfo object for the AddEventHandler(Object, Delegate) method of the event, including non-public methods.

(Inherited from EventInfo)
Attributes Attributes Attributes Attributes

Gets the attributes for this event.

CustomAttributes CustomAttributes CustomAttributes CustomAttributes

Gets a collection that contains this member's custom attributes.

(Inherited from MemberInfo)
DeclaringType DeclaringType DeclaringType DeclaringType

Gets the class that declares this member.

EventHandlerType EventHandlerType EventHandlerType EventHandlerType

Gets the Type object of the underlying event-handler delegate associated with this event.

(Inherited from EventInfo)
IsCollectible IsCollectible IsCollectible IsCollectible

Gets a value that indicates whether this MemberInfo object is part of an assembly held in a collectible AssemblyLoadContext.

(Inherited from MemberInfo)
IsMulticast IsMulticast IsMulticast IsMulticast

Gets a value indicating whether the event is multicast.

(Inherited from EventInfo)
IsSpecialName IsSpecialName IsSpecialName IsSpecialName

Gets a value indicating whether the EventInfo has a name with a special meaning.

(Inherited from EventInfo)
MemberType MemberType MemberType MemberType

Gets a MemberTypes value indicating that this member is an event.

(Inherited from EventInfo)
MetadataToken MetadataToken MetadataToken MetadataToken

Gets a value that identifies a metadata element.

(Inherited from MemberInfo)
Module Module Module Module

Gets the module in which the type that declares the member represented by the current MemberInfo is defined.

(Inherited from MemberInfo)
Name Name Name Name

Gets the name of the current member.

RaiseMethod RaiseMethod RaiseMethod RaiseMethod

Gets the method that is called when the event is raised, including non-public methods.

(Inherited from EventInfo)
ReflectedType ReflectedType ReflectedType ReflectedType

Gets the class object that was used to initialize this instance.

RemoveMethod RemoveMethod RemoveMethod RemoveMethod

Gets the MethodInfo object for removing a method of the event, including non-public methods.

(Inherited from EventInfo)

Methods

AddEventHandler(Object, Delegate) AddEventHandler(Object, Delegate) AddEventHandler(Object, Delegate) AddEventHandler(Object, Delegate)

Attaches an event handler to a COM object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Returns a value that indicates whether this instance is equal to a specified object.

(Inherited from EventInfo)
GetAddMethod() GetAddMethod() GetAddMethod() GetAddMethod()

Returns the method used to add an event handler delegate to the event source.

(Inherited from EventInfo)
GetAddMethod(Boolean) GetAddMethod(Boolean) GetAddMethod(Boolean) GetAddMethod(Boolean)

Gets the method that was used to add an event handler delegate to the event source.

GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean)

When overridden in a derived class, gets an array that contains all the custom attributes that are applied to this member.

GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean)

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() GetCustomAttributesData() GetCustomAttributesData() GetCustomAttributesData()

Returns a list of CustomAttributeData objects representing data about the attributes that have been applied to the target member.

(Inherited from MemberInfo)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns the hash code for this instance.

(Inherited from EventInfo)
GetOtherMethods() GetOtherMethods() GetOtherMethods() GetOtherMethods()

Returns the public methods that have been associated with an event in metadata using the .other directive.

(Inherited from EventInfo)
GetOtherMethods(Boolean) GetOtherMethods(Boolean) GetOtherMethods(Boolean) GetOtherMethods(Boolean)

Returns the methods that have been associated with the event in metadata using the .other directive, specifying whether to include non-public methods.

(Inherited from EventInfo)
GetRaiseMethod() GetRaiseMethod() GetRaiseMethod() GetRaiseMethod()

Returns the method that is called when the event is raised.

(Inherited from EventInfo)
GetRaiseMethod(Boolean) GetRaiseMethod(Boolean) GetRaiseMethod(Boolean) GetRaiseMethod(Boolean)

When overridden in a derived class, returns the method that was called when the event was raised.

GetRemoveMethod() GetRemoveMethod() GetRemoveMethod() GetRemoveMethod()

Returns the method used to remove an event handler delegate from the event source.

(Inherited from EventInfo)
GetRemoveMethod(Boolean) GetRemoveMethod(Boolean) GetRemoveMethod(Boolean) GetRemoveMethod(Boolean)

When overridden in a derived class, retrieves the MethodInfo object for removing a method of the event.

GetType() GetType() GetType() GetType() Inherited from EventInfo
HasSameMetadataDefinitionAs(MemberInfo) HasSameMetadataDefinitionAs(MemberInfo) HasSameMetadataDefinitionAs(MemberInfo) HasSameMetadataDefinitionAs(MemberInfo) Inherited from MemberInfo
IsDefined(Type, Boolean) IsDefined(Type, Boolean) IsDefined(Type, Boolean) IsDefined(Type, Boolean)

Indicates whether one or more instances of the specified attribute are applied to this member.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveEventHandler(Object, Delegate) RemoveEventHandler(Object, Delegate) RemoveEventHandler(Object, Delegate) RemoveEventHandler(Object, Delegate)

Detaches an event handler from a COM object.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICustomAttributeProvider.GetCustomAttributes(Boolean) ICustomAttributeProvider.GetCustomAttributes(Boolean) ICustomAttributeProvider.GetCustomAttributes(Boolean) ICustomAttributeProvider.GetCustomAttributes(Boolean) Inherited from MemberInfo
ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) Inherited from MemberInfo
ICustomAttributeProvider.IsDefined(Type, Boolean) ICustomAttributeProvider.IsDefined(Type, Boolean) ICustomAttributeProvider.IsDefined(Type, Boolean) ICustomAttributeProvider.IsDefined(Type, Boolean) Inherited from MemberInfo
_EventInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _EventInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _EventInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _EventInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Maps a set of names to a corresponding set of dispatch identifiers.

(Inherited from EventInfo)
_EventInfo.GetType() _EventInfo.GetType() _EventInfo.GetType() _EventInfo.GetType()

Returns a T:System.Type object representing the EventInfo type.

(Inherited from EventInfo)
_EventInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _EventInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _EventInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _EventInfo.GetTypeInfo(UInt32, UInt32, IntPtr)

Retrieves the type information for an object, which can then be used to get the type information for an interface.

(Inherited from EventInfo)
_EventInfo.GetTypeInfoCount(UInt32) _EventInfo.GetTypeInfoCount(UInt32) _EventInfo.GetTypeInfoCount(UInt32) _EventInfo.GetTypeInfoCount(UInt32)

Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Inherited from EventInfo)
_EventInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _EventInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _EventInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _EventInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Provides access to properties and methods exposed by an object.

(Inherited from EventInfo)
_MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Maps a set of names to a corresponding set of dispatch identifiers.

(Inherited from MemberInfo)
_MemberInfo.GetType() _MemberInfo.GetType() _MemberInfo.GetType() _MemberInfo.GetType()

Gets a Type object representing the MemberInfo class.

(Inherited from MemberInfo)
_MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr)

Retrieves the type information for an object, which can then be used to get the type information for an interface.

(Inherited from MemberInfo)
_MemberInfo.GetTypeInfoCount(UInt32) _MemberInfo.GetTypeInfoCount(UInt32) _MemberInfo.GetTypeInfoCount(UInt32) _MemberInfo.GetTypeInfoCount(UInt32)

Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Inherited from MemberInfo)
_MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Provides access to properties and methods exposed by an object.

(Inherited from MemberInfo)

Extension Methods

GetCustomAttribute(MemberInfo, Type) GetCustomAttribute(MemberInfo, Type) GetCustomAttribute(MemberInfo, Type) GetCustomAttribute(MemberInfo, Type)

Retrieves a custom attribute of a specified type that is applied to a specified member.

GetCustomAttribute(MemberInfo, Type, Boolean) GetCustomAttribute(MemberInfo, Type, Boolean) GetCustomAttribute(MemberInfo, Type, Boolean) GetCustomAttribute(MemberInfo, Type, Boolean)

Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member.

GetCustomAttribute<T>(MemberInfo) GetCustomAttribute<T>(MemberInfo) GetCustomAttribute<T>(MemberInfo) GetCustomAttribute<T>(MemberInfo)

Retrieves a custom attribute of a specified type that is applied to a specified member.

GetCustomAttribute<T>(MemberInfo, Boolean) GetCustomAttribute<T>(MemberInfo, Boolean) GetCustomAttribute<T>(MemberInfo, Boolean) GetCustomAttribute<T>(MemberInfo, Boolean)

Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member.

GetCustomAttributes(MemberInfo) GetCustomAttributes(MemberInfo) GetCustomAttributes(MemberInfo) GetCustomAttributes(MemberInfo)

Retrieves a collection of custom attributes that are applied to a specified member.

GetCustomAttributes(MemberInfo, Boolean) GetCustomAttributes(MemberInfo, Boolean) GetCustomAttributes(MemberInfo, Boolean) GetCustomAttributes(MemberInfo, Boolean)

Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member.

GetCustomAttributes(MemberInfo, Type) GetCustomAttributes(MemberInfo, Type) GetCustomAttributes(MemberInfo, Type) GetCustomAttributes(MemberInfo, Type)

Retrieves a collection of custom attributes of a specified type that are applied to a specified member.

GetCustomAttributes(MemberInfo, Type, Boolean) GetCustomAttributes(MemberInfo, Type, Boolean) GetCustomAttributes(MemberInfo, Type, Boolean) GetCustomAttributes(MemberInfo, Type, Boolean)

Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member.

GetCustomAttributes<T>(MemberInfo) GetCustomAttributes<T>(MemberInfo) GetCustomAttributes<T>(MemberInfo) GetCustomAttributes<T>(MemberInfo)

Retrieves a collection of custom attributes of a specified type that are applied to a specified member.

GetCustomAttributes<T>(MemberInfo, Boolean) GetCustomAttributes<T>(MemberInfo, Boolean) GetCustomAttributes<T>(MemberInfo, Boolean) GetCustomAttributes<T>(MemberInfo, Boolean)

Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member.

IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type)

Indicates whether custom attributes of a specified type are applied to a specified member.

IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean)

Indicates whether custom attributes of a specified type are applied to a specified member, and, optionally, applied to its ancestors.

GetAddMethod(EventInfo) GetAddMethod(EventInfo) GetAddMethod(EventInfo) GetAddMethod(EventInfo)
GetAddMethod(EventInfo, Boolean) GetAddMethod(EventInfo, Boolean) GetAddMethod(EventInfo, Boolean) GetAddMethod(EventInfo, Boolean)
GetRaiseMethod(EventInfo) GetRaiseMethod(EventInfo) GetRaiseMethod(EventInfo) GetRaiseMethod(EventInfo)
GetRaiseMethod(EventInfo, Boolean) GetRaiseMethod(EventInfo, Boolean) GetRaiseMethod(EventInfo, Boolean) GetRaiseMethod(EventInfo, Boolean)
GetRemoveMethod(EventInfo) GetRemoveMethod(EventInfo) GetRemoveMethod(EventInfo) GetRemoveMethod(EventInfo)
GetRemoveMethod(EventInfo, Boolean) GetRemoveMethod(EventInfo, Boolean) GetRemoveMethod(EventInfo, Boolean) GetRemoveMethod(EventInfo, Boolean)
GetMetadataToken(MemberInfo) GetMetadataToken(MemberInfo) GetMetadataToken(MemberInfo) GetMetadataToken(MemberInfo)
HasMetadataToken(MemberInfo) HasMetadataToken(MemberInfo) HasMetadataToken(MemberInfo) HasMetadataToken(MemberInfo)

Applies to