Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlSortKeyAccumulator.cs
Go to the documentation of this file.
2
4
7{
8 private XmlSortKey[] _keys;
9
10 private int _pos;
11
12 public Array Keys => _keys;
13
14 public void Create()
15 {
16 if (_keys == null)
17 {
18 _keys = new XmlSortKey[64];
19 }
20 _pos = 0;
21 _keys[0] = null;
22 }
23
25 {
26 AppendSortKey(collation.CreateSortKey(value));
27 }
28
33
38
43
48
53
58
59 public void FinishSortKeys()
60 {
61 _pos++;
62 if (_pos >= _keys.Length)
63 {
64 XmlSortKey[] array = new XmlSortKey[_pos * 2];
65 Array.Copy(_keys, array, _keys.Length);
66 _keys = array;
67 }
68 _keys[_pos] = null;
69 }
70
72 {
74 if (_keys[_pos] == null)
75 {
76 _keys[_pos] = key;
77 }
78 else
79 {
81 }
82 }
83}
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
Definition Array.cs:624
XmlSortKey AddSortKey(XmlSortKey sortKey)
Definition XmlSortKey.cs:20
void AddDecimalSortKey(XmlCollation collation, decimal value)
void AddDoubleSortKey(XmlCollation collation, double value)
void AddStringSortKey(XmlCollation collation, string value)
void AddIntSortKey(XmlCollation collation, int value)
void AddIntegerSortKey(XmlCollation collation, long value)
void AddDateTimeSortKey(XmlCollation collation, DateTime value)