Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Block5.cs
Go to the documentation of this file.
4
6
7internal sealed class Block5 : BlockExpression
8{
9 private object _arg0;
10
11 private readonly Expression _arg1;
12
13 private readonly Expression _arg2;
14
15 private readonly Expression _arg3;
16
17 private readonly Expression _arg4;
18
19 internal override int ExpressionCount => 5;
20
29
30 internal override Expression GetExpression(int index)
31 {
32 return index switch
33 {
34 0 => ExpressionUtils.ReturnObject<Expression>(_arg0),
35 1 => _arg1,
36 2 => _arg2,
37 3 => _arg3,
38 4 => _arg4,
39 _ => throw Error.ArgumentOutOfRange("index"),
40 };
41 }
42
44 {
45 if (expressions.Count == 5)
46 {
48 {
49 return ExpressionUtils.SameElements(expressions, current);
50 }
52 enumerator.MoveNext();
53 if (enumerator.Current == _arg0)
54 {
55 enumerator.MoveNext();
56 if (enumerator.Current == _arg1)
57 {
58 enumerator.MoveNext();
59 if (enumerator.Current == _arg2)
60 {
61 enumerator.MoveNext();
62 if (enumerator.Current == _arg3)
63 {
64 enumerator.MoveNext();
65 return enumerator.Current == _arg4;
66 }
67 }
68 }
69 }
70 }
71 return false;
72 }
73
78
80 {
81 return new Block5(args[0], args[1], args[2], args[3], args[4]);
82 }
83}
readonly Expression _arg3
Definition Block5.cs:15
override ReadOnlyCollection< Expression > GetOrMakeExpressions()
Definition Block5.cs:74
Block5(Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4)
Definition Block5.cs:21
override BlockExpression Rewrite(ReadOnlyCollection< ParameterExpression > variables, Expression[] args)
Definition Block5.cs:79
override int ExpressionCount
Definition Block5.cs:19
readonly Expression _arg4
Definition Block5.cs:17
override bool SameExpressions(ICollection< Expression > expressions)
Definition Block5.cs:43
override Expression GetExpression(int index)
Definition Block5.cs:30
readonly Expression _arg2
Definition Block5.cs:13
readonly Expression _arg1
Definition Block5.cs:11
static ReadOnlyCollection< Expression > ReturnReadOnlyExpressions(BlockExpression provider, ref object collection)
static Exception ArgumentOutOfRange(string paramName)
Definition Error.cs:818