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

◆ TryGet()

ItemType System.Diagnostics.Tracing.ConcurrentSet< KeyType, ItemType >.TryGet ( KeyType key)
inline

Definition at line 9 of file ConcurrentSet.cs.

10 {
11 ItemType[] array = items;
12 if (array == null)
13 {
14 goto IL_0045;
15 }
16 int num = 0;
17 int num2 = array.Length;
18 ItemType val;
19 while (true)
20 {
21 int num3 = (num + num2) / 2;
22 val = array[num3];
23 int num4 = val.Compare(key);
24 if (num4 == 0)
25 {
26 break;
27 }
28 if (num4 < 0)
29 {
30 num = num3 + 1;
31 }
32 else
33 {
34 num2 = num3;
35 }
36 if (num != num2)
37 {
38 continue;
39 }
40 goto IL_0045;
41 }
42 goto IL_004d;
43 IL_004d:
44 return val;
45 IL_0045:
46 val = null;
47 goto IL_004d;
48 }

References System.array, System.Diagnostics.Tracing.ConcurrentSet< KeyType, ItemType >.items, and System.key.