Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XPathAncestorIterator.cs
Go to the documentation of this file.
2
4
6{
11
12 public XPathAncestorIterator(XPathNavigator nav, string name, string namespaceURI, bool matchSelf)
13 : base(nav, name, namespaceURI, matchSelf)
14 {
15 }
16
18 : base(other)
19 {
20 }
21
22 public override bool MoveNext()
23 {
24 if (first)
25 {
26 first = false;
27 if (matchSelf && Matches)
28 {
29 position = 1;
30 return true;
31 }
32 }
33 while (nav.MoveToParent())
34 {
35 if (Matches)
36 {
37 position++;
38 return true;
39 }
40 }
41 return false;
42 }
43
44 public override XPathNodeIterator Clone()
45 {
46 return new XPathAncestorIterator(this);
47 }
48}
XPathAncestorIterator(XPathNavigator nav, string name, string namespaceURI, bool matchSelf)
XPathAncestorIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf)