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

◆ MakeDynamic() [6/7]

static DynamicExpression System.Linq.Expressions.ExpressionExtension.MakeDynamic ( Type delegateType,
CallSiteBinder binder,
IEnumerable< Expression > arguments )
inlinestatic

Definition at line 17 of file ExpressionExtension.cs.

18 {
20 switch (readOnlyList.Count)
21 {
22 case 1:
24 case 2:
26 case 3:
28 case 4:
30 default:
31 {
34 if (!delegateType.IsSubclassOf(typeof(MulticastDelegate)))
35 {
36 throw Error.TypeMustBeDerivedFromSystemDelegate();
37 }
41 return DynamicExpression.Make(validMethodForDynamic.GetReturnType(), delegateType, binder, arguments2);
42 }
43 }
44 }
static void RequiresNotNull(object value, string paramName)
static void ValidateArgumentTypes(MethodBase method, ExpressionType nodeKind, ref ReadOnlyCollection< Expression > arguments, string methodParamName)
static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, params Expression[] arguments)
static MethodInfo GetValidMethodForDynamic(Type delegateType)

References System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Linq.Expressions.ExpressionExtension.GetValidMethodForDynamic(), System.Linq.Expressions.DynamicExpression.Make(), System.Linq.Expressions.ExpressionExtension.MakeDynamic(), System.Dynamic.Utils.ContractUtils.RequiresNotNull(), System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate(), and System.Dynamic.Utils.ExpressionUtils.ValidateArgumentTypes().