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

◆ FindNewClass()

ExpandoClass System.Dynamic.ExpandoClass.FindNewClass ( string newKey)
inlinepackage

Definition at line 29 of file ExpandoClass.cs.

30 {
31 int hashCode = _hashCode ^ newKey.GetHashCode();
32 lock (this)
33 {
35 for (int i = 0; i < transitionList.Count; i++)
36 {
38 {
39 transitionList.RemoveAt(i);
40 i--;
41 }
42 else if (string.Equals(expandoClass._keys[expandoClass._keys.Length - 1], newKey, StringComparison.Ordinal))
43 {
44 return expandoClass;
45 }
46 }
47 string[] array = new string[_keys.Length + 1];
48 Array.Copy(_keys, array, _keys.Length);
49 array[_keys.Length] = newKey;
51 transitionList.Add(new WeakReference(expandoClass2));
52 return expandoClass2;
53 }
54 }
void Add(TKey key, TValue value)
List< WeakReference > GetTransitionList(int hashCode)
readonly string[] _keys

References System.Dynamic.ExpandoClass.ExpandoClass(), System.Dynamic.ExpandoClass._hashCode, System.Dynamic.ExpandoClass._keys, System.Collections.Generic.Dictionary< TKey, TValue >._keys, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.array, System.Array.Copy(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, and System.Dynamic.ExpandoClass.GetTransitionList().