Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ LambdaSignature()

Definition at line 32 of file CallSiteBinder.cs.

33 {
35 if (!typeFromHandle.IsSubclassOf(typeof(MulticastDelegate)))
36 {
38 }
39 MethodInfo invokeMethod = typeFromHandle.GetInvokeMethod();
40 ParameterInfo[] parametersCached = invokeMethod.GetParametersCached();
41 if (parametersCached[0].ParameterType != typeof(CallSite))
42 {
44 }
45 ParameterExpression[] array = new ParameterExpression[parametersCached.Length - 1];
46 for (int i = 0; i < array.Length; i++)
47 {
48 array[i] = Expression.Parameter(parametersCached[i + 1].ParameterType, "$arg" + i);
49 }
51 ReturnLabel = Expression.Label(invokeMethod.GetReturnType());
52 }
static Exception FirstArgumentMustBeCallSite()
Definition Error.cs:103
static Exception TypeParameterIsNotDelegate(object p0)
Definition Error.cs:98
static ParameterExpression Parameter(Type type)
static LabelExpression Label(LabelTarget target)
readonly ReadOnlyCollection< ParameterExpression > Parameters

References System.array, System.Linq.Expressions.Error.FirstArgumentMustBeCallSite(), System.Linq.Expressions.Expression< TDelegate >.Label(), System.Linq.Expressions.Expression< TDelegate >.Parameter(), System.Runtime.CompilerServices.CallSiteBinder.LambdaSignature< T >.Parameters, System.Runtime.CompilerServices.CallSiteBinder.LambdaSignature< T >.ReturnLabel, and System.Linq.Expressions.Error.TypeParameterIsNotDelegate().