Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DescendantQuery.cs
Go to the documentation of this file.
1
using
System.Xml.XPath
;
2
3
namespace
MS.Internal.Xml.XPath
;
4
5
internal
sealed
class
DescendantQuery
:
DescendantBaseQuery
6
{
7
private
XPathNodeIterator
_nodeIterator
;
8
9
internal
DescendantQuery
(
Query
qyParent,
string
Name
,
string
Prefix,
XPathNodeType
Type
,
bool
matchSelf
,
bool
abbrAxis
)
10
: base(qyParent,
Name
, Prefix,
Type
,
matchSelf
,
abbrAxis
)
11
{
12
}
13
14
public
DescendantQuery
(
DescendantQuery
other)
15
: base(other)
16
{
17
_nodeIterator
=
Query
.
Clone
(other._nodeIterator);
18
}
19
20
public
override
void
Reset
()
21
{
22
_nodeIterator
=
null
;
23
base.Reset();
24
}
25
26
public
override
XPathNavigator
Advance
()
27
{
28
while
(
true
)
29
{
30
if
(
_nodeIterator
==
null
)
31
{
32
position
= 0;
33
XPathNavigator
xPathNavigator =
qyInput
.
Advance
();
34
if
(xPathNavigator ==
null
)
35
{
36
return
null
;
37
}
38
if
(base.NameTest)
39
{
40
if
(base.TypeTest ==
XPathNodeType
.ProcessingInstruction)
41
{
42
_nodeIterator
=
new
IteratorFilter
(xPathNavigator.
SelectDescendants
(base.TypeTest,
matchSelf
), base.Name);
43
}
44
else
45
{
46
_nodeIterator
= xPathNavigator.
SelectDescendants
(base.Name, base.Namespace,
matchSelf
);
47
}
48
}
49
else
50
{
51
_nodeIterator
= xPathNavigator.
SelectDescendants
(base.TypeTest,
matchSelf
);
52
}
53
}
54
if
(
_nodeIterator
.
MoveNext
())
55
{
56
break
;
57
}
58
_nodeIterator
=
null
;
59
}
60
position
++;
61
currentNode
=
_nodeIterator
.
Current
;
62
return
currentNode
;
63
}
64
65
public
override
XPathNodeIterator
Clone
()
66
{
67
return
new
DescendantQuery
(
this
);
68
}
69
}
MS.Internal.Xml.XPath.BaseAxisQuery.position
int position
Definition
BaseAxisQuery.cs:22
MS.Internal.Xml.XPath.BaseAxisQuery.Name
string Name
Definition
BaseAxisQuery.cs:24
MS.Internal.Xml.XPath.BaseAxisQuery.qyInput
Query qyInput
Definition
BaseAxisQuery.cs:8
MS.Internal.Xml.XPath.BaseAxisQuery.currentNode
XPathNavigator currentNode
Definition
BaseAxisQuery.cs:20
MS.Internal.Xml.XPath.DescendantBaseQuery.matchSelf
bool matchSelf
Definition
DescendantBaseQuery.cs:8
MS.Internal.Xml.XPath.DescendantBaseQuery.abbrAxis
bool abbrAxis
Definition
DescendantBaseQuery.cs:10
MS.Internal.Xml.XPath.DescendantBaseQuery
Definition
DescendantBaseQuery.cs:7
MS.Internal.Xml.XPath.DescendantQuery.Reset
override void Reset()
Definition
DescendantQuery.cs:20
MS.Internal.Xml.XPath.DescendantQuery.DescendantQuery
DescendantQuery(DescendantQuery other)
Definition
DescendantQuery.cs:14
MS.Internal.Xml.XPath.DescendantQuery.Advance
override XPathNavigator Advance()
Definition
DescendantQuery.cs:26
MS.Internal.Xml.XPath.DescendantQuery._nodeIterator
XPathNodeIterator _nodeIterator
Definition
DescendantQuery.cs:7
MS.Internal.Xml.XPath.DescendantQuery.Clone
override XPathNodeIterator Clone()
Definition
DescendantQuery.cs:65
MS.Internal.Xml.XPath.DescendantQuery.DescendantQuery
DescendantQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type, bool matchSelf, bool abbrAxis)
Definition
DescendantQuery.cs:9
MS.Internal.Xml.XPath.DescendantQuery
Definition
DescendantQuery.cs:6
MS.Internal.Xml.XPath.IteratorFilter
Definition
IteratorFilter.cs:6
MS.Internal.Xml.XPath.Query.Advance
XPathNavigator Advance()
MS.Internal.Xml.XPath.Query.Clone
static Query Clone(Query input)
Definition
Query.cs:66
MS.Internal.Xml.XPath.Query
Definition
Query.cs:13
System.Type
Definition
Type.cs:14
System.Xml.XPath.XPathNavigator.SelectDescendants
virtual XPathNodeIterator SelectDescendants(XPathNodeType type, bool matchSelf)
Definition
XPathNavigator.cs:1395
System.Xml.XPath.XPathNavigator
Definition
XPathNavigator.cs:15
System.Xml.XPath.XPathNodeIterator.MoveNext
bool MoveNext()
System.Xml.XPath.XPathNodeIterator.Current
XPathNavigator? Current
Definition
XPathNodeIterator.cs:61
System.Xml.XPath.XPathNodeIterator
Definition
XPathNodeIterator.cs:8
MS.Internal.Xml.XPath
Definition
AbsoluteQuery.cs:3
System.Xml.XPath.XPathNodeType
XPathNodeType
Definition
XPathNodeType.cs:4
System.Xml.XPath
Definition
Extensions.cs:5
source
System.Private.Xml
MS.Internal.Xml.XPath
DescendantQuery.cs
Generated by
1.10.0