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

◆ this[TKey key]

Definition at line 12 of file HybridReferenceDictionary.cs.

13 {
14 get
15 {
17 {
18 return value;
19 }
21 }
22 set
23 {
24 if (_dict != null)
25 {
26 _dict[key] = value;
27 return;
28 }
29 int num;
30 if (_keysAndValues != null)
31 {
32 num = -1;
33 for (int i = 0; i < _keysAndValues.Length; i++)
34 {
35 if (_keysAndValues[i].Key == key)
36 {
38 return;
39 }
40 if (_keysAndValues[i].Key == null)
41 {
42 num = i;
43 }
44 }
45 }
46 else
47 {
49 num = 0;
50 }
51 if (num != -1)
52 {
54 return;
55 }
57 for (int j = 0; j < _keysAndValues.Length; j++)
58 {
59 _dict[_keysAndValues[j].Key] = _keysAndValues[j].Value;
60 }
61 _keysAndValues = null;
62 _dict[key] = value;
63 }
64 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Arg_KeyNotFoundWithKey
Definition SR.cs:94
Definition SR.cs:7