Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
QilNode.cs
Go to the documentation of this file.
3
4namespace System.Xml.Xsl.Qil;
5
6internal class QilNode : IList<QilNode>, ICollection<QilNode>, IEnumerable<QilNode>, IEnumerable
7{
9
11
13
14 protected object annotation;
15
17 {
18 get
19 {
20 return nodeType;
21 }
22 set
23 {
25 }
26 }
27
28 public virtual XmlQueryType XmlType
29 {
30 get
31 {
32 return xmlType;
33 }
34 set
35 {
36 xmlType = value;
37 }
38 }
39
41 {
42 get
43 {
44 return sourceLine;
45 }
46 set
47 {
49 }
50 }
51
52 public object Annotation
53 {
54 get
55 {
56 return annotation;
57 }
58 set
59 {
61 }
62 }
63
64 public virtual int Count => 0;
65
66 public virtual QilNode this[int index]
67 {
68 get
69 {
70 throw new IndexOutOfRangeException();
71 }
72 set
73 {
74 throw new IndexOutOfRangeException();
75 }
76 }
77
78 public virtual bool IsReadOnly => false;
79
84
90
91 public virtual QilNode DeepClone(QilFactory f)
92 {
93 return new QilCloneVisitor(f).Clone(this);
94 }
95
97 {
98 return (QilNode)MemberwiseClone();
99 }
100
101 public virtual void Insert(int index, QilNode node)
102 {
103 throw new NotSupportedException();
104 }
105
106 public virtual void RemoveAt(int index)
107 {
108 throw new NotSupportedException();
109 }
110
112 {
113 return new IListEnumerator<QilNode>(this);
114 }
115
120
121 public virtual void Add(QilNode node)
122 {
123 Insert(Count, node);
124 }
125
126 public virtual void Add(IList<QilNode> list)
127 {
128 for (int i = 0; i < list.Count; i++)
129 {
130 Insert(Count, list[i]);
131 }
132 }
133
134 public virtual void Clear()
135 {
136 for (int num = Count - 1; num >= 0; num--)
137 {
138 RemoveAt(num);
139 }
140 }
141
142 public virtual bool Contains(QilNode node)
143 {
144 return IndexOf(node) != -1;
145 }
146
147 public virtual void CopyTo(QilNode[] array, int index)
148 {
149 for (int i = 0; i < Count; i++)
150 {
151 array[index + i] = this[i];
152 }
153 }
154
155 public virtual bool Remove(QilNode node)
156 {
157 int num = IndexOf(node);
158 if (num >= 0)
159 {
160 RemoveAt(num);
161 return true;
162 }
163 return false;
164 }
165
166 public virtual int IndexOf(QilNode node)
167 {
168 for (int i = 0; i < Count; i++)
169 {
170 if (node.Equals(this[i]))
171 {
172 return i;
173 }
174 }
175 return -1;
176 }
177}
virtual bool Remove(QilNode node)
Definition QilNode.cs:155
IEnumerator< QilNode > GetEnumerator()
Definition QilNode.cs:111
virtual void Clear()
Definition QilNode.cs:134
ISourceLineInfo SourceLine
Definition QilNode.cs:41
virtual bool Contains(QilNode node)
Definition QilNode.cs:142
virtual XmlQueryType XmlType
Definition QilNode.cs:29
virtual QilNode ShallowClone(QilFactory f)
Definition QilNode.cs:96
virtual int IndexOf(QilNode node)
Definition QilNode.cs:166
QilNode(QilNodeType nodeType)
Definition QilNode.cs:80
virtual void Add(IList< QilNode > list)
Definition QilNode.cs:126
QilNode(QilNodeType nodeType, XmlQueryType xmlType)
Definition QilNode.cs:85
virtual QilNode DeepClone(QilFactory f)
Definition QilNode.cs:91
virtual bool IsReadOnly
Definition QilNode.cs:78
virtual void Insert(int index, QilNode node)
Definition QilNode.cs:101
virtual void CopyTo(QilNode[] array, int index)
Definition QilNode.cs:147
virtual void RemoveAt(int index)
Definition QilNode.cs:106
ISourceLineInfo sourceLine
Definition QilNode.cs:12
virtual void Add(QilNode node)
Definition QilNode.cs:121
new IEnumerator< T > GetEnumerator()