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

◆ GetHelperType()

static Type System.Linq.Expressions.Interpreter.CallInstruction.GetHelperType ( MethodInfo info,
Type[] arrTypes )
inlinestaticprivateinherited

Definition at line 380 of file CallInstruction.cs.

381 {
382 if (info.ReturnType == typeof(void))
383 {
384 return arrTypes.Length switch
385 {
386 0 => typeof(ActionCallInstruction),
387 1 => typeof(ActionCallInstruction<>).MakeGenericType(arrTypes),
388 2 => typeof(ActionCallInstruction<, >).MakeGenericType(arrTypes),
389 3 => typeof(ActionCallInstruction<, , >).MakeGenericType(arrTypes),
390 4 => typeof(ActionCallInstruction<, , , >).MakeGenericType(arrTypes),
391 _ => throw new InvalidOperationException(),
392 };
393 }
394 return arrTypes.Length switch
395 {
396 1 => typeof(FuncCallInstruction<>).MakeGenericType(arrTypes),
397 2 => typeof(FuncCallInstruction<, >).MakeGenericType(arrTypes),
398 3 => typeof(FuncCallInstruction<, , >).MakeGenericType(arrTypes),
399 4 => typeof(FuncCallInstruction<, , , >).MakeGenericType(arrTypes),
400 5 => typeof(FuncCallInstruction<, , , , >).MakeGenericType(arrTypes),
401 _ => throw new InvalidOperationException(),
402 };
403 }

References System.info.

Referenced by System.Linq.Expressions.Interpreter.CallInstruction.SlowCreate().