System.Linq.Expressions.Error.FirstArgumentMustBeCallSite C# (CSharp) Méthode

FirstArgumentMustBeCallSite() static private méthode

ArgumentException with message like "First argument of delegate must be CallSite"
static private FirstArgumentMustBeCallSite ( ) : Exception
Résultat System.Exception
        internal static Exception FirstArgumentMustBeCallSite()
        {
            return new ArgumentException(Strings.FirstArgumentMustBeCallSite);
        }
        /// <summary>

Usage Example

        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);
        }
Error