Method | Description | |
---|---|---|
CanProxy ( ) : bool |
Determines whether a proxy can be generated for the types given in the constructor.
|
|
DelegateDuckProxyType ( |
Constructs an object.
|
|
Prepare ( ) : void |
Prepares by generating the proxy type for the types given in the constructor.
|
|
WrapDuck ( |
Calls the static WrapDuck method of the generated proxy type to initialize a new instance of the proxy type with a given duck delegate and return a delegate to its invoke method.
|
Method | Description | |
---|---|---|
GenerateProxyType ( ) : void |
If a proxy type has not been generated yet, generates a proxy type that defines a method matching the method signature of the to delegate type given in the constructor which forwards calls to a delegate of the from type given in the constructor.
|
|
GetParameterTypes ( |
Utility to create an array of parameter types from an array of parameters.
|
|
ImplementInvokeMethod ( |
Implements the method of the proxy type that invokes the delegate given in its constructor.
|
public DelegateDuckProxyType ( |
||
toDelegateType | Type to be casted to. | |
fromDelegateType | Type of delegate to be casted. | |
return | System |
public WrapDuck ( |
||
duck | Duck delegate that the new proxy object should forward calls to. | |
return |