Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MethodCallExpression5.cs
Go to the documentation of this file.
5
7
9{
10 private object _arg0;
11
12 private readonly Expression _arg1;
13
14 private readonly Expression _arg2;
15
16 private readonly Expression _arg3;
17
18 private readonly Expression _arg4;
19
20 public override int ArgumentCount => 5;
21
31
32 public override Expression GetArgument(int index)
33 {
34 return index switch
35 {
36 0 => ExpressionUtils.ReturnObject<Expression>(_arg0),
37 1 => _arg1,
38 2 => _arg2,
39 3 => _arg3,
40 4 => _arg4,
41 _ => throw new ArgumentOutOfRangeException("index"),
42 };
43 }
44
46 {
47 if (arguments != null && arguments.Count == 5)
48 {
50 {
51 return ExpressionUtils.SameElements(arguments, current);
52 }
54 enumerator.MoveNext();
55 if (enumerator.Current == _arg0)
56 {
57 enumerator.MoveNext();
58 if (enumerator.Current == _arg1)
59 {
60 enumerator.MoveNext();
61 if (enumerator.Current == _arg2)
62 {
63 enumerator.MoveNext();
64 if (enumerator.Current == _arg3)
65 {
66 enumerator.MoveNext();
67 return enumerator.Current == _arg4;
68 }
69 }
70 }
71 }
72 }
73 return false;
74 }
75
80
82 {
83 if (args != null)
84 {
85 return Expression.Call(base.Method, args[0], args[1], args[2], args[3], args[4]);
86 }
87 return Expression.Call(base.Method, ExpressionUtils.ReturnObject<Expression>(_arg0), _arg1, _arg2, _arg3, _arg4);
88 }
89}
static ReadOnlyCollection< ParameterExpression > ReturnReadOnly(IParameterProvider provider, ref object collection)
static MethodCallExpression Call(MethodInfo method)
override bool SameArguments(ICollection< Expression > arguments)
override ReadOnlyCollection< Expression > GetOrMakeArguments()
MethodCallExpression5(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4)
override MethodCallExpression Rewrite(Expression instance, IReadOnlyList< Expression > args)