Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetHashCode()

override int System.Xml.Schema.KeySequence.GetHashCode ( )
inline

Definition at line 54 of file KeySequence.cs.

55 {
56 if (_hashcode != -1)
57 {
58 return _hashcode;
59 }
60 _hashcode = 0;
61 for (int i = 0; i < _ks.Length; i++)
62 {
63 _ks[i].SetDecimal();
64 if (_ks[i].IsDecimal)
65 {
66 for (int j = 0; j < _ks[i].Dim; j++)
67 {
68 _hashcode += _ks[i].Dvalue[j].GetHashCode();
69 }
70 }
71 else if (_ks[i].Value is Array array)
72 {
73 if (array is XmlAtomicValue[] array2)
74 {
75 for (int k = 0; k < array2.Length; k++)
76 {
77 _hashcode += ((XmlAtomicValue)array2.GetValue(k)).TypedValue.GetHashCode();
78 }
79 }
80 else
81 {
82 for (int l = 0; l < ((Array)_ks[i].Value).Length; l++)
83 {
84 _hashcode += ((Array)_ks[i].Value).GetValue(l).GetHashCode();
85 }
86 }
87 }
88 else
89 {
90 _hashcode += _ks[i].Value.GetHashCode();
91 }
92 }
93 return _hashcode;
94 }
readonly TypedObject[] _ks
Definition KeySequence.cs:8

References System.Xml.Schema.KeySequence._hashcode, System.Xml.Schema.KeySequence._ks, System.array, System.Xml.Array, System.Xml.Dictionary, System.Xml.Schema.TypedObject.Dim, System.Xml.Schema.TypedObject.Dvalue, System.Xml.Schema.TypedObject.SetDecimal(), and System.Xml.Schema.TypedObject.Value.