Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SerializationInfoEnumerator.cs
Go to the documentation of this file.
2
4
6{
7 private readonly string[] _members;
8
9 private readonly object[] _data;
10
11 private readonly Type[] _types;
12
13 private readonly int _numItems;
14
15 private int _currItem;
16
17 private bool _current;
18
20
32
33 public string Name
34 {
35 get
36 {
37 if (!_current)
38 {
40 }
41 return _members[_currItem];
42 }
43 }
44
45 public object? Value
46 {
47 get
48 {
49 if (!_current)
50 {
52 }
53 return _data[_currItem];
54 }
55 }
56
58 {
59 get
60 {
61 if (!_current)
62 {
64 }
65 return _types[_currItem];
66 }
67 }
68
69 internal SerializationInfoEnumerator(string[] members, object[] info, Type[] types, int numItems)
70 {
72 _data = info;
73 _types = types;
74 _numItems = numItems - 1;
75 _currItem = -1;
76 }
77
78 public bool MoveNext()
79 {
80 if (_currItem < _numItems)
81 {
82 _currItem++;
83 _current = true;
84 }
85 else
86 {
87 _current = false;
88 }
89 return _current;
90 }
91
92 public void Reset()
93 {
94 _currItem = -1;
95 _current = false;
96 }
97}
SerializationInfoEnumerator(string[] members, object[] info, Type[] types, int numItems)
static string InvalidOperation_EnumOpCantHappen
Definition SR.cs:48
Definition SR.cs:7