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

◆ Item()

override XmlNode System.Xml.XmlElementList.Item ( int index)
inline

Definition at line 220 of file XmlElementList.cs.

221 {
222 if (_rootNode == null || index < 0)
223 {
224 return null;
225 }
226 if (_empty)
227 {
228 return null;
229 }
230 if (_curInd == index)
231 {
232 return _curElem;
233 }
234 int num = index - _curInd;
235 bool bNext = num > 0;
236 if (num < 0)
237 {
238 num = -num;
239 }
240 XmlNode nthMatchingNode;
241 if ((nthMatchingNode = GetNthMatchingNode(_curElem, bNext, num)) != null)
242 {
243 _curInd = index;
245 return _curElem;
246 }
247 return null;
248 }
XmlNode GetNthMatchingNode(XmlNode n, bool bNext, int nCount)
readonly XmlNode _rootNode

References System.Xml.XmlElementList._curElem, System.Xml.XmlElementList._curInd, System.Xml.XmlElementList._empty, System.Xml.XmlElementList._rootNode, System.Xml.Dictionary, System.Xml.XmlElementList.GetNthMatchingNode(), and System.index.