Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NamespaceQuery.cs
Go to the documentation of this file.
2
4
5internal sealed class NamespaceQuery : BaseAxisQuery
6{
7 private bool _onNamespace;
8
9 public NamespaceQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type)
10 : base(qyParent, Name, Prefix, Type)
11 {
12 }
13
15 : base(other)
16 {
17 _onNamespace = other._onNamespace;
18 }
19
20 public override void Reset()
21 {
22 _onNamespace = false;
23 base.Reset();
24 }
25
26 public override XPathNavigator Advance()
27 {
28 do
29 {
30 if (!_onNamespace)
31 {
33 if (currentNode == null)
34 {
35 return null;
36 }
37 position = 0;
40 }
41 else
42 {
44 }
45 }
46 while (!_onNamespace || !matches(currentNode));
47 position++;
48 return currentNode;
49 }
50
51 public override bool matches(XPathNavigator e)
52 {
53 if (e.Value.Length == 0)
54 {
55 return false;
56 }
57 if (base.NameTest)
58 {
59 return base.Name.Equals(e.LocalName);
60 }
61 return true;
62 }
63
64 public override XPathNodeIterator Clone()
65 {
66 return new NamespaceQuery(this);
67 }
68}
override XPathNavigator Advance()
override XPathNodeIterator Clone()
NamespaceQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type)
override bool matches(XPathNavigator e)
XPathNavigator Advance()
bool MoveToFirstNamespace(XPathNamespaceScope namespaceScope)
bool MoveToNextNamespace(XPathNamespaceScope namespaceScope)