Class EventInfoIntrospectionProviderExtensions
Provides a set of extension methods for IEventInfoIntrospectionProvider.
Inheritance
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public static class EventInfoIntrospectionProviderExtensions : Object
Methods
GetAddMethod(IEventInfoIntrospectionProvider, EventInfo)
Retrieves the System.Reflection.MethodInfo object for the System.Reflection.EventInfo.AddEventHandler(System.Object,System.Delegate) method of the event.
Declaration
public static MethodInfo GetAddMethod(this IEventInfoIntrospectionProvider provider, EventInfo event)
Parameters
Type | Name | Description |
---|---|---|
IEventInfoIntrospectionProvider | provider | The reflection introspection provider. |
System.Reflection.EventInfo | event | The event to get the add method for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object representing the method used to add an event handler delegate from the event source. |
GetOtherMethods(IEventInfoIntrospectionProvider, EventInfo)
Returns the public methods that have been associated with an event in metadata using the .other directive.
Declaration
public static IReadOnlyList<MethodInfo> GetOtherMethods(this IEventInfoIntrospectionProvider provider, EventInfo event)
Parameters
Type | Name | Description |
---|---|---|
IEventInfoIntrospectionProvider | provider | The reflection introspection provider. |
System.Reflection.EventInfo | event | The event to get the associated methods for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of System.Reflection.MethodInfo objects representing the public methods that have been associated with the event in metadata by using the .other directive. If there are no such public methods, an empty array is returned. |
GetRaiseMethod(IEventInfoIntrospectionProvider, EventInfo)
Returns the method that is called when the event is raised.
Declaration
public static MethodInfo GetRaiseMethod(this IEventInfoIntrospectionProvider provider, EventInfo event)
Parameters
Type | Name | Description |
---|---|---|
IEventInfoIntrospectionProvider | provider | The reflection introspection provider. |
System.Reflection.EventInfo | event | The event to get the raise method for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object that was called when the event was raised. |
GetRemoveMethod(IEventInfoIntrospectionProvider, EventInfo)
Retrieves the System.Reflection.MethodInfo object for the System.Reflection.EventInfo.RemoveEventHandler(System.Object,System.Delegate) method of the event.
Declaration
public static MethodInfo GetRemoveMethod(this IEventInfoIntrospectionProvider provider, EventInfo event)
Parameters
Type | Name | Description |
---|---|---|
IEventInfoIntrospectionProvider | provider | The reflection introspection provider. |
System.Reflection.EventInfo | event | The event to get the remove method for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object representing the method used to remove an event handler delegate from the event source. |
IsSpecialName(IEventInfoIntrospectionProvider, EventInfo)
Gets a value indicating whether the event has the SpecialName attribute.
Declaration
public static bool IsSpecialName(this IEventInfoIntrospectionProvider provider, EventInfo event)
Parameters
Type | Name | Description |
---|---|---|
IEventInfoIntrospectionProvider | provider | The reflection introspection provider. |
System.Reflection.EventInfo | event | The event to inspect. |
Returns
Type | Description |
---|---|
System.Boolean | true if the event has the SpecialName attribute set; otherwise, false. |