Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XPathNodeIterator.cs
Go to the documentation of this file.
3
4namespace System.Xml.XPath;
5
6[DebuggerDisplay("Position={CurrentPosition}, Current={debuggerDisplayProxy}")]
7public abstract class XPathNodeIterator : ICloneable, IEnumerable
8{
9 private sealed class Enumerator : IEnumerator
10 {
11 private readonly XPathNodeIterator _original;
12
14
15 private bool _iterationStarted;
16
17 public object Current
18 {
19 get
20 {
22 {
23 if (_current == null)
24 {
26 }
27 return _current.Current.Clone();
28 }
30 }
31 }
32
37
38 public bool MoveNext()
39 {
41 {
43 _iterationStarted = true;
44 }
45 if (_current == null || !_current.MoveNext())
46 {
47 _current = null;
48 return false;
49 }
50 return true;
51 }
52
53 public void Reset()
54 {
55 _iterationStarted = false;
56 }
57 }
58
59 internal int count = -1;
60
61 public abstract XPathNavigator? Current { get; }
62
63 public abstract int CurrentPosition { get; }
64
65 public virtual int Count
66 {
67 get
68 {
69 if (count == -1)
70 {
72 while (xPathNodeIterator.MoveNext())
73 {
74 }
75 count = xPathNodeIterator.CurrentPosition;
76 }
77 return count;
78 }
79 }
80
81 private object? debuggerDisplayProxy
82 {
83 get
84 {
85 if (Current != null)
86 {
88 }
89 return null;
90 }
91 }
92
94 {
95 return Clone();
96 }
97
98 public abstract XPathNodeIterator Clone();
99
100 public abstract bool MoveNext();
101
102 public virtual IEnumerator GetEnumerator()
103 {
104 return new Enumerator(this);
105 }
106}
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Sch_EnumNotStarted
Definition SR.cs:1204
static string Sch_EnumFinished
Definition SR.cs:1206
Definition SR.cs:7