Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ VisitMethodCall()

override Expression System.Linq.EnumerableRewriter.VisitMethodCall ( MethodCallExpression m)
inlineprotectedvirtual

Reimplemented from System.Linq.Expressions.ExpressionVisitor.

Definition at line 24 of file EnumerableRewriter.cs.

25 {
26 Expression expression = Visit(m.Object);
28 if (expression != m.Object || readOnlyCollection != m.Arguments)
29 {
30 MethodInfo method = m.Method;
31 Type[] typeArgs = (method.IsGenericMethod ? method.GetGenericArguments() : null);
32 if ((method.IsStatic || method.DeclaringType.IsAssignableFrom(expression.Type)) && ArgsMatch(method, readOnlyCollection, typeArgs))
33 {
35 }
36 if (method.DeclaringType == typeof(Queryable))
37 {
41 }
45 }
46 return m;
47 }
static MethodInfo FindEnumerableMethodForQueryable(string name, ReadOnlyCollection< Expression > args, params Type[] typeArgs)
static bool ArgsMatch(MethodInfo m, ReadOnlyCollection< Expression > args, Type[] typeArgs)
static MethodInfo FindMethod(Type type, string name, ReadOnlyCollection< Expression > args, Type[] typeArgs)
ReadOnlyCollection< Expression > FixupQuotedArgs(MethodInfo mi, ReadOnlyCollection< Expression > argList)
virtual ? Expression Visit(Expression? node)
static MethodCallExpression Call(MethodInfo method)

References System.Linq.EnumerableRewriter.ArgsMatch(), System.Linq.Expressions.Expression< TDelegate >.Call(), System.Linq.EnumerableRewriter.FindEnumerableMethodForQueryable(), System.Linq.EnumerableRewriter.FindMethod(), System.Linq.EnumerableRewriter.FixupQuotedArgs(), and System.Linq.Expressions.ExpressionVisitor.Visit().