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

◆ GetData()

byte[] System.Diagnostics.PerformanceCounterLib.PerformanceMonitor.GetData ( string item)
inlinepackage

Definition at line 39 of file PerformanceCounterLib.cs.

40 {
41 int num = 17;
42 int num2 = 0;
43 byte[] array = null;
44 int num3 = 0;
45 while (num > 0)
46 {
47 try
48 {
49 return (byte[])_perfDataKey.GetValue(item);
50 }
51 catch (IOException ex)
52 {
53 num3 = ex.HResult;
54 if (num3 <= 167)
55 {
56 if (num3 == 6)
57 {
58 goto IL_0078;
59 }
60 if (num3 == 21 || num3 == 167)
61 {
62 goto IL_007e;
63 }
64 }
65 else if (num3 <= 258)
66 {
67 if (num3 == 170 || num3 == 258)
68 {
69 goto IL_007e;
70 }
71 }
72 else if (num3 == 1722 || num3 == 1726)
73 {
74 goto IL_0078;
75 }
76 throw new Win32Exception(num3);
77 IL_007e:
78 num--;
79 if (num2 == 0)
80 {
81 num2 = 10;
82 continue;
83 }
85 num2 *= 2;
86 goto end_IL_0029;
87 IL_0078:
88 Init();
89 goto IL_007e;
91 }
92 catch (InvalidCastException innerException)
93 {
95 }
96 }
97 throw new Win32Exception(num3);
98 }
static string CounterDataCorrupt
Definition SR.cs:84
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
static void Sleep(int millisecondsTimeout)
Definition Thread.cs:658

References System.Diagnostics.PerformanceCounterLib.PerformanceMonitor._perfDataKey, System.array, System.SR.CounterDataCorrupt, System.SR.Format(), System.Diagnostics.PerformanceCounterLib.PerformanceMonitor.Init(), System.item, and System.Threading.Thread.Sleep().

Referenced by System.Diagnostics.PerformanceCounterLib.GetPerformanceData().