Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
BlockExpressionList.cs
Go to the documentation of this file.
5
7
8internal sealed class BlockExpressionList : IList<Expression>, ICollection<Expression>, IEnumerable<Expression>, IEnumerable
9{
10 private readonly BlockExpression _block;
11
12 private readonly Expression _arg0;
13
14 public Expression this[int index]
15 {
16 get
17 {
18 if (index == 0)
19 {
20 return _arg0;
21 }
23 }
24 [ExcludeFromCodeCoverage(Justification = "Unreachable")]
25 set
26 {
28 }
29 }
30
32
33 [ExcludeFromCodeCoverage(Justification = "Unreachable")]
34 public bool IsReadOnly
35 {
36 get
37 {
39 }
40 }
41
47
49 {
50 if (_arg0 == item)
51 {
52 return 0;
53 }
54 for (int i = 1; i < _block.ExpressionCount; i++)
55 {
56 if (_block.GetExpression(i) == item)
57 {
58 return i;
59 }
60 }
61 return -1;
62 }
63
64 [ExcludeFromCodeCoverage(Justification = "Unreachable")]
65 public void Insert(int index, Expression item)
66 {
68 }
69
70 [ExcludeFromCodeCoverage(Justification = "Unreachable")]
71 public void RemoveAt(int index)
72 {
74 }
75
76 [ExcludeFromCodeCoverage(Justification = "Unreachable")]
77 public void Add(Expression item)
78 {
80 }
81
82 [ExcludeFromCodeCoverage(Justification = "Unreachable")]
83 public void Clear()
84 {
86 }
87
89 {
90 return IndexOf(item) != -1;
91 }
92
93 public void CopyTo(Expression[] array, int index)
94 {
96 if (index < 0)
97 {
98 throw Error.ArgumentOutOfRange("index");
99 }
101 if (index + expressionCount > array.Length)
102 {
103 throw new ArgumentException();
104 }
105 array[index++] = _arg0;
106 for (int i = 1; i < expressionCount; i++)
107 {
109 }
110 }
111
112 [ExcludeFromCodeCoverage(Justification = "Unreachable")]
113 public bool Remove(Expression item)
114 {
116 }
117
119 {
120 yield return _arg0;
121 for (int i = 1; i < _block.ExpressionCount; i++)
122 {
123 yield return _block.GetExpression(i);
124 }
125 }
126
131}
static void RequiresNotNull(object value, string paramName)
void Insert(int index, Expression item)
BlockExpressionList(BlockExpression provider, Expression arg0)
void CopyTo(Expression[] array, int index)
virtual Expression GetExpression(int index)
static Exception ArgumentOutOfRange(string paramName)
Definition Error.cs:818
new IEnumerator< T > GetEnumerator()