Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ContextQuery.cs
Go to the documentation of this file.
2
4
5internal class ContextQuery : Query
6{
8
9 public override XPathNavigator Current => contextNode;
10
11 public override XPathResultType StaticType => XPathResultType.NodeSet;
12
13 public override int CurrentPosition => count;
14
15 public override int Count => 1;
16
17 public override QueryProps Properties => (QueryProps)23;
18
19 public ContextQuery()
20 {
21 count = 0;
22 }
23
24 protected ContextQuery(ContextQuery other)
25 : base(other)
26 {
27 contextNode = other.contextNode;
28 }
29
30 public override void Reset()
31 {
32 count = 0;
33 }
34
35 public override object Evaluate(XPathNodeIterator context)
36 {
37 contextNode = context.Current;
38 count = 0;
39 return this;
40 }
41
42 public override XPathNavigator Advance()
43 {
44 if (count == 0)
45 {
46 count = 1;
47 return contextNode;
48 }
49 return null;
50 }
51
52 public override XPathNavigator MatchNode(XPathNavigator current)
53 {
54 return current;
55 }
56
57 public override XPathNodeIterator Clone()
58 {
59 return new ContextQuery(this);
60 }
61}
override object Evaluate(XPathNodeIterator context)
override XPathNavigator MatchNode(XPathNavigator current)
override XPathResultType StaticType
override XPathNavigator Current
override XPathNodeIterator Clone()
override XPathNavigator Advance()