terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
RegisteredWaitHandle.cs
Go to the documentation of this file.
1using System;
4
5namespace System.Threading
6{
7 // Token: 0x0200020D RID: 525
8 [ComVisible(true)]
10 {
11 // Token: 0x060012A9 RID: 4777 RVA: 0x00027474 File Offset: 0x00025674
13 {
15 this._callback = callback;
16 this._timeout = timeout;
18 }
19
20 // Token: 0x060012AA RID: 4778 RVA: 0x000274A8 File Offset: 0x000256A8
21 internal void Wait(object state)
22 {
23 SafeWaitHandle safeWaitHandle = this._waitObject.SafeWaitHandle;
25 if (waitObject != null && waitObject == null)
26 {
28 }
30 if (cancelEvent != null && cancelEvent == null)
31 {
33 }
34 TimeSpan timeout = this._timeout;
35 if (!this._unregistered)
36 {
38 long num = 0L;
40 if (callsInProcess != 0)
41 {
42 Monitor.Exit(this);
43 }
44 if (num != 0L)
45 {
46 throw new OutOfMemoryException();
47 }
48 if (!this._unregistered)
49 {
51 while (!executeOnlyOnce)
52 {
53 }
54 return;
55 }
56 }
58 int num2 = 1;
59 this._unregistered = num2 != 0;
60 if (callsInProcess2 != 0)
61 {
62 return;
63 }
65 while (finalEvent == null)
66 {
67 }
68 bool flag = NativeEventCalls.SetEvent(finalEvent.SafeWaitHandle);
69 long num3 = 0L;
70 if (callsInProcess2 != 0)
71 {
72 Monitor.Exit(this);
73 }
74 if (num3 != 0L)
75 {
76 throw new OutOfMemoryException();
77 }
78 long num4 = 0L;
79 if (callsInProcess2 != 0)
80 {
82 }
83 if (num4 == 0L)
84 {
85 return;
86 }
87 throw new OutOfMemoryException();
88 }
89
90 // Token: 0x060012AB RID: 4779 RVA: 0x00027620 File Offset: 0x00025820
91 private void DoCallBack(object timedOut)
92 {
93 WaitOrTimerCallback callback = this._callback;
94 if (callback != null)
95 {
96 object state = this._state;
97 IntPtr method_code = callback.method_code;
98 IntPtr invoke_impl = callback.invoke_impl;
99 IntPtr method = callback.method;
100 }
101 }
102
103 // Token: 0x060012AC RID: 4780 RVA: 0x00027660 File Offset: 0x00025860
104 [ComVisible(true)]
106 {
107 bool unregistered = this._unregistered;
108 long num;
109 if (unregistered)
110 {
111 num = 0L;
112 }
114 this._finalEvent = num;
115 this._unregistered = true;
116 bool flag = cancelEvent.Set();
117 long num2 = 0L;
118 if (unregistered)
119 {
120 Monitor.Exit(this);
121 }
122 if (num2 == 0L)
123 {
124 return true;
125 }
126 throw new OutOfMemoryException();
127 }
128
129 // Token: 0x040009DA RID: 2522
131
132 // Token: 0x040009DB RID: 2523
134
135 // Token: 0x040009DC RID: 2524
136 private object _state;
137
138 // Token: 0x040009DD RID: 2525
140
141 // Token: 0x040009DE RID: 2526
143
144 // Token: 0x040009DF RID: 2527
146
147 // Token: 0x040009E0 RID: 2528
148 private int _callsInProcess;
149
150 // Token: 0x040009E1 RID: 2529
151 private bool _executeOnlyOnce;
152
153 // Token: 0x040009E2 RID: 2530
154 private bool _unregistered;
155 }
156}
class f__AnonymousType0<< Count > j__TPar
IntPtr method_code
Definition Delegate.cs:386
IntPtr invoke_impl
Definition Delegate.cs:371
static void Exit(object obj)
Definition Monitor.cs:47
static bool SetEvent(SafeWaitHandle handle)
RegisteredWaitHandle(WaitHandle waitObject, WaitOrTimerCallback callback, object state, TimeSpan timeout, bool executeOnlyOnce)
SafeWaitHandle SafeWaitHandle
Definition WaitHandle.cs:80