C# Class Spring.Objects.Events.Support.EventManipulationUtils

Utility class to aid in the manipulation of events and delegates.
Datei anzeigen Open project: spring-projects/spring-net Class Usage Examples

Public Methods

Method Description
GetHandlerDelegate ( Type delegateType, object targetSubscriber, MethodInfo targetSubscriberDelegateMethod ) : Delegate

Returns a new instance of the requested Delegate.

Often used to wire subscribers to event publishers.

GetMethodInfoMatchingSignature ( MethodInfo invoke, Type subscriberType ) : MethodInfo

Queries the input type for a MethodInfo signature matching the input MethodInfo signature.

Typically used to query a potential subscriber to see if they implement an event handler.

Private Methods

Method Description
EventManipulationUtils ( ) : System

Creates a new instance of the EventManipulationUtilities class.

This is a utility class, and as such has no publicly visible constructors.

Method Details

GetHandlerDelegate() public static method

Returns a new instance of the requested Delegate.

Often used to wire subscribers to event publishers.

public static GetHandlerDelegate ( Type delegateType, object targetSubscriber, MethodInfo targetSubscriberDelegateMethod ) : Delegate
delegateType System.Type /// The of delegate to create. ///
targetSubscriber object /// The target subscriber object that contains the delegate implementation. ///
targetSubscriberDelegateMethod System.Reflection.MethodInfo /// referencing the delegate method on the subscriber. ///
return System.Delegate

GetMethodInfoMatchingSignature() public static method

Queries the input type for a MethodInfo signature matching the input MethodInfo signature.
Typically used to query a potential subscriber to see if they implement an event handler.
public static GetMethodInfoMatchingSignature ( MethodInfo invoke, Type subscriberType ) : MethodInfo
invoke System.Reflection.MethodInfo to match against
subscriberType System.Type to query
return System.Reflection.MethodInfo