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

◆ CreateCustomNoMatchDelegate()

T System.Runtime.CompilerServices.CallSite< T >.CreateCustomNoMatchDelegate ( MethodInfo invoke)
inlineprivate

Definition at line 300 of file CallSite.cs.

301 {
302 ParameterExpression[] array = Array.ConvertAll(invoke.GetParametersCached(), (ParameterInfo p) => Expression.Parameter(p.ParameterType, p.Name));
303 return Expression.Lambda<T>(Expression.Block(Expression.Call(typeof(CallSiteOps).GetMethod("SetNotMatched"), array[0]), Expression.Default(invoke.GetReturnType())), new TrueReadOnlyCollection<ParameterExpression>(array)).Compile();
304 }
static BlockExpression Block(Expression arg0, Expression arg1)
static DefaultExpression Default(Type type)
static LambdaExpression Lambda(Expression body, params ParameterExpression[]? parameters)
static MethodCallExpression Call(MethodInfo method)
static ParameterExpression Parameter(Type type)

References System.array, System.Linq.Expressions.Expression< TDelegate >.Block(), System.Linq.Expressions.Expression< TDelegate >.Call(), System.Linq.Expressions.Expression< TDelegate >.Default(), System.Linq.Expressions.Expression< TDelegate >.Lambda(), System.Reflection.ParameterInfo.Name, System.Linq.Expressions.Expression< TDelegate >.Parameter(), and System.Reflection.ParameterInfo.ParameterType.

Referenced by System.Runtime.CompilerServices.CallSite< T >.MakeUpdateDelegate().