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

◆ Advance()

override XPathNavigator MS.Internal.Xml.XPath.FollowingQuery.Advance ( )
inline

Definition at line 29 of file FollowingQuery.cs.

30 {
31 if (_iterator == null)
32 {
34 if (_input == null)
35 {
36 return null;
37 }
38 XPathNavigator xPathNavigator;
39 do
40 {
41 xPathNavigator = _input.Clone();
43 }
44 while (xPathNavigator.IsDescendant(_input));
45 _input = xPathNavigator;
46 _iterator = XPathEmptyIterator.Instance;
47 }
48 while (!_iterator.MoveNext())
49 {
50 bool matchSelf;
51 if (_input.NodeType == XPathNodeType.Attribute || _input.NodeType == XPathNodeType.Namespace)
52 {
54 matchSelf = false;
55 }
56 else
57 {
58 while (!_input.MoveToNext())
59 {
60 if (!_input.MoveToParent())
61 {
62 return null;
63 }
64 }
65 matchSelf = true;
66 }
67 if (base.NameTest)
68 {
69 _iterator = _input.SelectDescendants(base.Name, base.Namespace, matchSelf);
70 }
71 else
72 {
73 _iterator = _input.SelectDescendants(base.TypeTest, matchSelf);
74 }
75 }
76 position++;
78 return currentNode;
79 }
XPathNavigator Advance()
virtual XPathNodeIterator SelectDescendants(XPathNodeType type, bool matchSelf)
virtual bool IsDescendant([NotNullWhen(true)] XPathNavigator? nav)

References MS.Internal.Xml.XPath.FollowingQuery._input, MS.Internal.Xml.XPath.FollowingQuery._iterator, MS.Internal.Xml.XPath.Query.Advance(), System.Xml.XPath.XPathNavigator.Clone(), System.Xml.XPath.XPathNodeIterator.Current, MS.Internal.Xml.XPath.BaseAxisQuery.currentNode, MS.Internal.Xml.XPath.XPathEmptyIterator.Instance, System.Xml.XPath.XPathNavigator.IsDescendant(), System.Xml.XPath.XPathNodeIterator.MoveNext(), System.Xml.XPath.XPathNavigator.MoveToNext(), System.Xml.XPath.XPathNavigator.MoveToParent(), System.Xml.XPath.XPathNavigator.NodeType, MS.Internal.Xml.XPath.BaseAxisQuery.position, MS.Internal.Xml.XPath.BaseAxisQuery.qyInput, and System.Xml.XPath.XPathNavigator.SelectDescendants().