Gets the dynamic invoker for the given delegate.
Declaring type: SafeDynamicInvoker
Namespace: Zyan.Communication.Delegates
Assembly: Zyan.Communication
Collapse/Expand Syntax
C#
public static Func<Delegate, object[], object> GetDynamicInvoker (
        Delegate deleg
) 
Parameters
deleg
The delegate to invoke.
Return Value
Dynamic invocation function.
Collapse/Expand Remarks
Dynamic invokers uses runtime code generation instead of the late binding of the Delegate.DynamicInvoke. It doesn't wrap the exception thrown by the delegate into System.Reflection.TargetInvocationException. On .NET runtime (versions 3.5, 4.0 and 4.5), this invoker is 10-12 times faster than the original DynamicInvoke. On Mono runtime (version 2.10.5), it performs 1.5-2 times slower than the original DynamicInvoke.