Struct InternalMethodReference<TDelegate>
Represents a reference to an internal method, encapsulating the ability to dynamically resolve and retrieve a delegate of the specified type.
public struct InternalMethodReference<TDelegate> where TDelegate : Delegate
Type Parameters
TDelegateThe type of the delegate representing the internal method. Must derive from Delegate.
Remarks
This structure is designed to facilitate the dynamic resolution of internal methods, such as those exposed by external libraries, and provides caching to optimize subsequent delegate retrievals. It is particularly useful in scenarios where internal methods are resolved at runtime and invoked through delegates.
Constructors
- InternalMethodReference(Type?, string)
Initializes a new instance of the InternalMethodReference<TDelegate> structure with the specified container type and method name.
Methods
- GetDelegate()
Retrieves a delegate of the specified type, representing a native method, if available.