Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XPathDocumentElementDescendantIterator.cs
Go to the documentation of this file.
1using System;
3
5
7{
8 private readonly XPathDocumentNavigator _end;
9
10 private readonly string _localName;
11
12 private readonly string _namespaceUri;
13
14 private bool _matchSelf;
15
16 public XPathDocumentElementDescendantIterator(XPathDocumentNavigator root, string name, string namespaceURI, bool matchSelf)
17 : base(root)
18 {
19 if (namespaceURI == null)
20 {
21 throw new ArgumentNullException("namespaceURI");
22 }
23 _localName = root.NameTable.Get(name);
24 _namespaceUri = namespaceURI;
25 _matchSelf = matchSelf;
26 if (root.NodeType != 0)
27 {
28 _end = new XPathDocumentNavigator(root);
30 }
31 }
32
41
42 public override XPathNodeIterator Clone()
43 {
45 }
46
47 public override bool MoveNext()
48 {
49 if (_matchSelf)
50 {
51 _matchSelf = false;
53 {
54 pos++;
55 return true;
56 }
57 }
59 {
60 return false;
61 }
62 pos++;
63 return true;
64 }
65}
XPathDocumentElementDescendantIterator(XPathDocumentNavigator root, string name, string namespaceURI, bool matchSelf)
override bool MoveToFollowing(string localName, string namespaceURI, XPathNavigator end)
bool IsElementMatch(string localName, string namespaceURI)