Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XPathArrayIterator.cs
Go to the documentation of this file.
1using System;
5
7
8[DebuggerDisplay("Position={CurrentPosition}, Current={debuggerDisplayProxy, nq}")]
10{
11 protected IList list;
12
13 protected int index;
14
15 public IList AsList => list;
16
17 public override XPathNavigator Current
18 {
19 get
20 {
21 if (index < 1)
22 {
24 }
25 return (XPathNavigator)list[index - 1];
26 }
27 }
28
29 public override int CurrentPosition => index;
30
31 public override int Count => list.Count;
32
33 private object debuggerDisplayProxy
34 {
35 get
36 {
37 if (index >= 1)
38 {
40 }
41 return null;
42 }
43 }
44
46 {
47 this.list = list;
48 }
49
51 {
52 list = it.list;
53 index = it.index;
54 }
55
57 {
58 list = new ArrayList();
59 while (nodeIterator.MoveNext())
60 {
61 list.Add(nodeIterator.Current.Clone());
62 }
63 }
64
65 public override XPathNodeIterator Clone()
66 {
67 return new XPathArrayIterator(this);
68 }
69
70 public override bool MoveNext()
71 {
72 if (index == list.Count)
73 {
74 return false;
75 }
76 index++;
77 return true;
78 }
79
80 public override void Reset()
81 {
82 index = 0;
83 }
84
85 public override IEnumerator GetEnumerator()
86 {
87 return list.GetEnumerator();
88 }
89}
XPathArrayIterator(XPathNodeIterator nodeIterator)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Sch_EnumNotStarted
Definition SR.cs:1204
Definition SR.cs:7
int Add(object? value)