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
ContextAwareResult.cs
Go to the documentation of this file.
1using System;
4
5namespace System.Net
6{
7 // Token: 0x0200011E RID: 286
9 {
10 // Token: 0x060006CD RID: 1741 RVA: 0x00018EF0 File Offset: 0x000170F0
11 private void SafeCaptureIdentity()
12 {
13 }
14
15 // Token: 0x060006CE RID: 1742 RVA: 0x00018F00 File Offset: 0x00017100
16 private void CleanupInternal()
17 {
18 }
19
20 // Token: 0x060006CF RID: 1743 RVA: 0x00018F10 File Offset: 0x00017110
25
26 // Token: 0x060006D0 RID: 1744 RVA: 0x00018F28 File Offset: 0x00017128
34
35 // Token: 0x060006D1 RID: 1745 RVA: 0x00018F58 File Offset: 0x00017158
42
43 // Token: 0x17000178 RID: 376
44 // (get) Token: 0x060006D2 RID: 1746 RVA: 0x00018F98 File Offset: 0x00017198
46 {
47 get
48 {
49 do
50 {
51 bool internalPeekCompleted = base.InternalPeekCompleted;
52 }
53 while (this._context != null);
54 if (this.m_AsyncCallback == null)
55 {
56 if (this._flags == ContextAwareResult.StateFlags.None)
57 {
58 }
59 NetEventSource.Fail(this, "No context captured - specify a callback or forceCaptureContext.", "ContextCopy");
60 }
62 object @lock;
63 if (this._lock == null)
64 {
65 if (flags == ContextAwareResult.StateFlags.None)
66 {
67 }
68 NetEventSource.Fail(this, "Must lock (StartPostingAsyncOp()) { ... FinishPostingAsyncOp(); } when calling ContextCopy (unless it's only called after FinishPostingAsyncOp).", "ContextCopy");
69 @lock = this._lock;
70 }
71 long num = 0L;
72 if (flags != ContextAwareResult.StateFlags.None)
73 {
75 }
76 if (num == 0L)
77 {
78 bool internalPeekCompleted2 = base.InternalPeekCompleted;
79 return this._context;
80 }
81 throw new OutOfMemoryException();
82 }
83 }
84
85 // Token: 0x060006D3 RID: 1747 RVA: 0x00019064 File Offset: 0x00017264
86 internal object StartPostingAsyncOp()
87 {
88 return this.StartPostingAsyncOp(true);
89 }
90
91 // Token: 0x060006D4 RID: 1748 RVA: 0x00019078 File Offset: 0x00017278
92 internal object StartPostingAsyncOp(bool lockCapture)
93 {
94 /*
95An exception occurred when decompiling this method (060006D4)
96
97ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object System.Net.ContextAwareResult::StartPostingAsyncOp(System.Boolean)
98
99 ---> System.Exception: Basic block has to end with unconditional control flow.
100{
101 Block_0:
102 stloc:bool(var_0_06, callgetter:bool(LazyAsyncResult::get_InternalPeekCompleted, ldloc:ContextAwareResult[exp:LazyAsyncResult](this)))
103 call:void(NetEventSource::Fail, ldloc:ContextAwareResult[exp:object](this), ldstr:string[exp:object]("Called on completed result."), ldstr:string("StartPostingAsyncOp"))
104 stloc:int64(var_1_18, ldc.i4:int64(0))
105 stloc:StateFlags(var_2_1F, ldfld:StateFlags(ContextAwareResult::_flags, ldloc:ContextAwareResult(this)))
106 stfld:object(ContextAwareResult::_lock, ldloc:ContextAwareResult(this), ldloc:int64[exp:object](var_1_18))
107 stfld:StateFlags(ContextAwareResult::_flags, ldloc:ContextAwareResult(this), ldloc:StateFlags(var_2_1F))
108}
109
110 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
111 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
112 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
113 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
114 --- End of inner exception stack trace ---
115 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
116 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
117*/;
118 }
119
120 // Token: 0x060006D5 RID: 1749 RVA: 0x000190B4 File Offset: 0x000172B4
121 internal bool FinishPostingAsyncOp()
122 {
124 this._flags = flags;
125 bool flag;
126 return flag;
127 }
128
129 // Token: 0x060006D6 RID: 1750 RVA: 0x000190D4 File Offset: 0x000172D4
131 {
133 this._flags = flags;
134 if (this.m_AsyncCallback != null)
135 {
136 this.m_AsyncCallback = flags;
137 bool flag;
138 return flag;
139 }
140 bool flag2;
141 return flag2;
142 }
143
144 // Token: 0x060006D7 RID: 1751 RVA: 0x0001910C File Offset: 0x0001730C
145 protected override void Cleanup()
146 {
147 base.Cleanup();
149 if (!true)
150 {
151 }
152 }
153
154 // Token: 0x060006D8 RID: 1752 RVA: 0x0001912C File Offset: 0x0001732C
156 {
157 if (this._flags == ContextAwareResult.StateFlags.None)
158 {
159 }
160 NetEventSource.Fail(this, "Called without calling StartPostingAsyncOp.", "CaptureOrComplete");
163 if (asyncCallback != null)
164 {
165 }
167 if (!true)
168 {
169 if (flags == ContextAwareResult.StateFlags.None)
170 {
171 }
173 if (flags == ContextAwareResult.StateFlags.None)
174 {
175 }
176 NetEventSource.Info(this, "starting identity capture", "CaptureOrComplete");
177 }
178 if (true)
179 {
180 bool internalPeekCompleted2 = base.InternalPeekCompleted;
181 }
182 if (flags == ContextAwareResult.StateFlags.None)
183 {
184 }
186 if (flags == ContextAwareResult.StateFlags.None)
187 {
188 }
189 NetEventSource.Info(this, "Skipping capture", "CaptureOrComplete");
191 if (asyncCallback2 != null)
192 {
193 bool completedSynchronously = base.CompletedSynchronously;
194 if (asyncCallback2 == null)
195 {
196 }
197 NetEventSource.Fail(this, "Didn't capture context, but didn't complete synchronously!", "CaptureOrComplete");
198 if (asyncCallback2 == null)
199 {
200 }
202 if (asyncCallback2 == null)
203 {
204 }
205 NetEventSource.Info(this, "starting capture", "CaptureOrComplete");
207 if ("Didn't capture context, but didn't complete synchronously!" == null)
208 {
210 if (executionContext == null)
211 {
212 goto IL_00DE;
213 }
214 }
216 IL_00DE:
218 ExecutionContext context = this._context;
219 if (context != null && context == null)
220 {
221 throw new ArrayTypeMismatchException();
222 }
223 if (asyncCallback == null)
224 {
225 }
227 NetEventSource.Info(this, formattableString, "CaptureOrComplete");
228 }
229 bool completedSynchronously2 = base.CompletedSynchronously;
231 NetEventSource.Info(this, "Completing synchronously", "CaptureOrComplete");
232 return true;
233 }
234
235 // Token: 0x060006D9 RID: 1753 RVA: 0x00019268 File Offset: 0x00017468
236 protected override void Complete(IntPtr userToken)
237 {
238 if (!true)
239 {
240 }
242 ExecutionContext context = this._context;
244 NetEventSource.Info(this, formattableString, "Complete");
246 base.Complete(userToken);
247 }
248
249 // Token: 0x060006DA RID: 1754 RVA: 0x000192BC File Offset: 0x000174BC
250 private void CompleteCallback()
251 {
252 if (!true)
253 {
254 }
256 if (!true)
257 {
258 }
259 }
260
261 // Token: 0x17000179 RID: 377
262 // (get) Token: 0x060006DB RID: 1755 RVA: 0x000192D8 File Offset: 0x000174D8
263 internal virtual EndPoint RemoteEndPoint
264 {
265 get
266 {
267 }
268 }
269
270 // Token: 0x0400053E RID: 1342
272
273 // Token: 0x0400053F RID: 1343
274 private object _lock;
275
276 // Token: 0x04000540 RID: 1344
278
279 // Token: 0x0200011F RID: 287
280 [Flags]
281 private enum StateFlags : byte
282 {
283 // Token: 0x04000542 RID: 1346
284 None = 0,
285 // Token: 0x04000543 RID: 1347
286 CaptureIdentity = 1,
287 // Token: 0x04000544 RID: 1348
288 CaptureContext = 2,
289 // Token: 0x04000545 RID: 1349
291 // Token: 0x04000546 RID: 1350
293 // Token: 0x04000547 RID: 1351
295 }
296
297 // Token: 0x02000120 RID: 288
299 [Serializable]
300 private sealed class <>c
301 {
302 // Token: 0x060006DC RID: 1756 RVA: 0x000192E8 File Offset: 0x000174E8
303 // Note: this type is marked as 'beforefieldinit'.
304 static <>c()
305 {
306 }
307
308 // Token: 0x060006DD RID: 1757 RVA: 0x000192F8 File Offset: 0x000174F8
309 public <>c()
310 {
311 }
312
313 // Token: 0x060006DE RID: 1758 RVA: 0x0001930C File Offset: 0x0001750C
314 internal void <Complete>b__17_0(object s)
315 {
316 if (s != null)
317 {
318 }
319 }
320
321 // Token: 0x04000548 RID: 1352
322 public static readonly ContextAwareResult.<>c <>9;
323
324 // Token: 0x04000549 RID: 1353
325 public static ContextCallback <>9__17_0;
326 }
327 }
328}
class f__AnonymousType0<< Count > j__TPar
ContextAwareResult(object myObject, object myState, AsyncCallback myCallBack)
override void Complete(IntPtr userToken)
ContextAwareResult(bool captureIdentity, bool forceCaptureContext, object myObject, object myState, AsyncCallback myCallBack)
ContextAwareResult.StateFlags _flags
bool FinishPostingAsyncOp(CallbackClosure closure)
bool CaptureOrComplete(ExecutionContext cachedContext, bool returnContext)
ContextAwareResult(bool captureIdentity, bool forceCaptureContext, bool threadSafeContextCopy, object myObject, object myState, AsyncCallback myCallBack)
object StartPostingAsyncOp(bool lockCapture)
static void Info(object thisOrContextObject, [Optional] FormattableString formattableString, [CallerMemberName][Optional] string memberName)
static void Fail(object thisOrContextObject, FormattableString formattableString, [CallerMemberName][Optional] string memberName)
static ExecutionContext Capture()
static void Exit(object obj)
Definition Monitor.cs:47