NuGet.QueryableUtility.GetQueryableMethod C# (CSharp) Method

GetQueryableMethod() private static method

private static GetQueryableMethod ( Expression expression ) : MethodInfo
expression System.Linq.Expressions.Expression
return System.Reflection.MethodInfo
        private static MethodInfo GetQueryableMethod(Expression expression)
        {
            if (expression.NodeType == ExpressionType.Call) {
                var call = (MethodCallExpression)expression;
                if (call.Method.IsStatic && call.Method.DeclaringType == typeof(Queryable)) {
                    return call.Method.GetGenericMethodDefinition();
                }
            }
            return null;
        }