Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XPathDescendantIterator.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
XPathDescendantIterator
:
XPathAxisIterator
6
{
7
private
int
_level
;
8
9
public
XPathDescendantIterator
(
XPathNavigator
nav
,
XPathNodeType
type
,
bool
matchSelf
)
10
: base(
nav
,
type
,
matchSelf
)
11
{
12
}
13
14
public
XPathDescendantIterator
(
XPathNavigator
nav
,
string
name
,
string
namespaceURI,
bool
matchSelf
)
15
: base(
nav
,
name
, namespaceURI,
matchSelf
)
16
{
17
}
18
19
public
XPathDescendantIterator
(
XPathDescendantIterator
it)
20
: base(it)
21
{
22
_level
= it.
_level
;
23
}
24
25
public
override
XPathNodeIterator
Clone
()
26
{
27
return
new
XPathDescendantIterator
(
this
);
28
}
29
30
public
override
bool
MoveNext
()
31
{
32
if
(
_level
== -1)
33
{
34
return
false
;
35
}
36
if
(
first
)
37
{
38
first
=
false
;
39
if
(
matchSelf
&&
Matches
)
40
{
41
position
= 1;
42
return
true
;
43
}
44
}
45
do
46
{
47
if
(
nav
.
MoveToFirstChild
())
48
{
49
_level
++;
50
continue
;
51
}
52
while
(
true
)
53
{
54
if
(
_level
== 0)
55
{
56
_level
= -1;
57
return
false
;
58
}
59
if
(
nav
.
MoveToNext
())
60
{
61
break
;
62
}
63
nav
.
MoveToParent
();
64
_level
--;
65
}
66
}
67
while
(!
Matches
);
68
position
++;
69
return
true
;
70
}
71
}
MS.Internal.Xml.XPath.XPathAxisIterator.position
int position
Definition
XPathAxisIterator.cs:16
MS.Internal.Xml.XPath.XPathAxisIterator.name
string name
Definition
XPathAxisIterator.cs:12
MS.Internal.Xml.XPath.XPathAxisIterator.nav
XPathNavigator nav
Definition
XPathAxisIterator.cs:8
MS.Internal.Xml.XPath.XPathAxisIterator.Matches
virtual bool Matches
Definition
XPathAxisIterator.cs:27
MS.Internal.Xml.XPath.XPathAxisIterator.type
XPathNodeType type
Definition
XPathAxisIterator.cs:10
MS.Internal.Xml.XPath.XPathAxisIterator.first
bool first
Definition
XPathAxisIterator.cs:20
MS.Internal.Xml.XPath.XPathAxisIterator.matchSelf
bool matchSelf
Definition
XPathAxisIterator.cs:18
MS.Internal.Xml.XPath.XPathAxisIterator
Definition
XPathAxisIterator.cs:7
MS.Internal.Xml.XPath.XPathDescendantIterator.MoveNext
override bool MoveNext()
Definition
XPathDescendantIterator.cs:30
MS.Internal.Xml.XPath.XPathDescendantIterator.XPathDescendantIterator
XPathDescendantIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf)
Definition
XPathDescendantIterator.cs:9
MS.Internal.Xml.XPath.XPathDescendantIterator.XPathDescendantIterator
XPathDescendantIterator(XPathNavigator nav, string name, string namespaceURI, bool matchSelf)
Definition
XPathDescendantIterator.cs:14
MS.Internal.Xml.XPath.XPathDescendantIterator._level
int _level
Definition
XPathDescendantIterator.cs:7
MS.Internal.Xml.XPath.XPathDescendantIterator.XPathDescendantIterator
XPathDescendantIterator(XPathDescendantIterator it)
Definition
XPathDescendantIterator.cs:19
MS.Internal.Xml.XPath.XPathDescendantIterator.Clone
override XPathNodeIterator Clone()
Definition
XPathDescendantIterator.cs:25
MS.Internal.Xml.XPath.XPathDescendantIterator
Definition
XPathDescendantIterator.cs:6
System.Xml.XPath.XPathNavigator.MoveToFirstChild
bool MoveToFirstChild()
System.Xml.XPath.XPathNavigator.MoveToParent
bool MoveToParent()
System.Xml.XPath.XPathNavigator.MoveToNext
bool MoveToNext()
System.Xml.XPath.XPathNavigator
Definition
XPathNavigator.cs:15
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
XPathDescendantIterator.cs
Generated by
1.10.0