System.Linq.Expressions.Expression.GetValidMethodForDynamic C# (CSharp) Метод

GetValidMethodForDynamic() приватный статический Метод

private static GetValidMethodForDynamic ( Type delegateType ) : MethodInfo
delegateType Type
Результат System.Reflection.MethodInfo
        private static MethodInfo GetValidMethodForDynamic(Type delegateType)
        {
            var method = delegateType.GetMethod("Invoke");
            var pi = method.GetParametersCached();
            if (pi.Length == 0 || pi[0].ParameterType != typeof(CallSite)) throw Error.FirstArgumentMustBeCallSite();
            return method;
        }
    }
Expression