System.Linq.Expressions.Expression.GetValidMethodForDynamic C# (CSharp) Method

GetValidMethodForDynamic() private static method

private static GetValidMethodForDynamic ( Type delegateType ) : MethodInfo
delegateType Type
return 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