Пример #1
0
        private Delegate CreateDelegate(Type delegateType, out MethodInfo method)
        {
            method = CreateDelegateMethodInfo();

            if (_dynamicMethod)
            {
                return(method.CreateDelegate(delegateType, new Closure(_boundConstants.ToArray(), null)));
            }
            else
            {
                return(method.CreateDelegate(delegateType));
            }
        }
Пример #2
0
        private Delegate CreateDelegate()
        {
            Debug.Assert(_method is DynamicMethod);

            return(_method.CreateDelegate(_lambda.Type, new Closure(_boundConstants.ToArray(), null)));
        }