ComAwareEventInfo Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
ComAwareEventInfo may be unavailable in future releases.
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
public class ComAwareEventInfo : System.Reflection.EventInfo
[<System.Obsolete("ComAwareEventInfo may be unavailable in future releases.")>]
type ComAwareEventInfo = class
inherit EventInfo
type ComAwareEventInfo = class
inherit EventInfo
Public Class ComAwareEventInfo
Inherits EventInfo
- Inheritance
- Attributes
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.
Com |
Initializes a new instance of the ComAwareEventInfo class by using the specified type and a name of the event on the type. |
Add |
Gets the MethodInfo object for the AddEventHandler(Object, Delegate) method of the event, including non-public methods. (Inherited from EventInfo) |
Attributes |
Gets the attributes for this event. |
Custom |
Gets a collection that contains this member's custom attributes. (Inherited from MemberInfo) |
Declaring |
Gets the class that declares this member. |
Event |
Gets the |
Is |
Gets a value that indicates whether this MemberInfo object is part of an assembly held in a collectible AssemblyLoadContext. (Inherited from MemberInfo) |
Is |
Gets a value indicating whether the event is multicast. (Inherited from EventInfo) |
Is |
Gets a value indicating whether the |
Member |
Gets a MemberTypes value indicating that this member is an event. (Inherited from EventInfo) |
Metadata |
Gets the metadata token associated with the current ComAwareEventInfo object. |
Metadata |
Gets a value that identifies a metadata element. (Inherited from MemberInfo) |
Module |
Gets the module associated with the current ComAwareEventInfo object. |
Module |
Gets the module in which the type that declares the member represented by the current MemberInfo is defined. (Inherited from MemberInfo) |
Name |
Gets the name of the current member. |
Raise |
Gets the method that is called when the event is raised, including non-public methods. (Inherited from EventInfo) |
Reflected |
Gets the class object that was used to initialize this instance. |
Reflected |
Gets the class object that was used to obtain this instance of |
Remove |
Gets the |
Add |
Attaches an event handler to a COM object. |
Equals(Object) |
Returns a value that indicates whether this instance is equal to a specified object. (Inherited from EventInfo) |
Get |
Returns the method used to add an event handler delegate to the event source. (Inherited from EventInfo) |
Get |
Gets the method that was used to add an event handler delegate to the event source. |
Get |
When overridden in a derived class, retrieves the |
Get |
When overridden in a derived class, gets an array that contains all the custom attributes that are applied to this member. |
Get |
When overridden in a derived class, returns an array of all custom attributes applied to this member. (Inherited from MemberInfo) |
Get |
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. |
Get |
When overridden in a derived class, returns an array of custom attributes applied to this member and identified by Type. (Inherited from MemberInfo) |
Get |
Returns a list of CustomAttributeData objects for the current ComAwareEventInfo. |
Get |
Returns a list of CustomAttributeData objects representing data about the attributes that have been applied to the target member. (Inherited from MemberInfo) |
Get |
Returns the hash code for this instance. (Inherited from EventInfo) |
Get |
Returns the public methods that have been associated with an event in metadata using the |
Get |
Returns the public or non-public methods that have been associated with an event in metadata. |
Get |
Returns the methods that have been associated with the event in metadata using the |
Get |
Returns the method that is called when the event is raised. (Inherited from EventInfo) |
Get |
When overridden in a derived class, returns the method that was called when the event was raised. |
Get |
When overridden in a derived class, returns the method that is called when the event is raised, specifying whether to return non-public methods. (Inherited from EventInfo) |
Get |
Returns the method used to remove an event handler delegate from the event source. (Inherited from EventInfo) |
Get |
When overridden in a derived class, retrieves the MethodInfo object for removing a method of the event. |
Get |
When overridden in a derived class, retrieves the |
Get |
Discovers the attributes of a class event and provides access to event metadata. (Inherited from EventInfo) |
Has |
(Inherited from MemberInfo) |
Is |
Indicates whether one or more instances of the specified attribute are applied to this member. |
Is |
When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. (Inherited from MemberInfo) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Remove |
Detaches an event handler from a COM object. |
To |
Returns a string that represents the current object. (Inherited from Object) |
_Event |
Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from EventInfo) |
_Event |
Returns a |
_Event |
Retrieves the type information for an object, which can then be used to get the type information for an interface. (Inherited from EventInfo) |
_Event |
Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from EventInfo) |
_Event |
Provides access to properties and methods exposed by an object. (Inherited from EventInfo) |
_Member |
Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from MemberInfo) |
_Member |
Gets a Type object representing the MemberInfo class. (Inherited from MemberInfo) |
_Member |
Retrieves the type information for an object, which can then be used to get the type information for an interface. (Inherited from MemberInfo) |
_Member |
Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from MemberInfo) |
_Member |
Provides access to properties and methods exposed by an object. (Inherited from MemberInfo) |
ICustom |
Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes. (Inherited from MemberInfo) |
ICustom |
Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type. (Inherited from MemberInfo) |
ICustom |
Indicates whether one or more instance of |
Get |
Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. |
Get |
Retrieves a custom attribute of a specified type that is applied to a specified member. |
Get |
Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. |
Get |
Retrieves a custom attribute of a specified type that is applied to a specified member. |
Get |
Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member. |
Get |
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. |
Get |
Retrieves a collection of custom attributes of a specified type that are applied to a specified member. |
Get |
Retrieves a collection of custom attributes that are applied to a specified member. |
Get |
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. |
Get |
Retrieves a collection of custom attributes of a specified type that are applied to a specified member. |
Is |
Indicates whether custom attributes of a specified type are applied to a specified member, and, optionally, applied to its ancestors. |
Is |
Indicates whether custom attributes of a specified type are applied to a specified member. |
Get |
|
Get |
|
Get |
|
Get |
|
Get |
|
Get |
|
Get |
Gets a metadata token for the given member, if available. |
Has |
Returns a value that indicates whether a metadata token is available for the specified member. |
Product | Versions (Obsolete) |
---|---|
.NET | 5, 6, 7, 8, 9 (Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1) |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 (4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)) |
.NET Standard | 1.1, 2.0 (1.2, 1.3, 1.4, 1.5, 1.6, 2.1) |
UWP | (10.0) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: