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
ThreadContentRequest.cs
Go to the documentation of this file.
1using System;
7using UnityEngine;
8
10{
11 // Token: 0x020003C6 RID: 966
13 {
14 // Token: 0x06001A4D RID: 6733 RVA: 0x0006C3F8 File Offset: 0x0006A5F8
16 {
17 object obj;
18 do
19 {
20 if (!true)
21 {
22 }
23 IntPtr extra_arg = createFunction.extra_arg;
25 if (obj == null)
26 {
27 return;
28 }
29 }
30 while (obj != null);
31 throw new InvalidCastException();
32 }
33
34 // Token: 0x06001A4E RID: 6734 RVA: 0x0006C424 File Offset: 0x0006A624
36 {
37 object obj;
38 do
39 {
40 if (!true)
41 {
42 }
43 IntPtr extra_arg = createFunction.extra_arg;
45 if (obj == null)
46 {
47 return;
48 }
49 }
50 while (obj != null);
51 throw new InvalidCastException();
52 }
53
54 // Token: 0x06001A4F RID: 6735 RVA: 0x0006C450 File Offset: 0x0006A650
55 public static T ConstructOnMainThread<T>(string asset, string asset2, string asset3, ThreadContentRequest.ObjectCreate3 createFunction) where T : class
56 {
57 object obj;
58 do
59 {
60 if (!true)
61 {
62 }
63 IntPtr extra_arg = createFunction.extra_arg;
65 if (obj == null)
66 {
67 return;
68 }
69 }
70 while (obj != null);
71 throw new InvalidCastException();
72 }
73
74 // Token: 0x06001A50 RID: 6736 RVA: 0x0006C47C File Offset: 0x0006A67C
75 public static global::UnityEngine.Object Load(string asset)
76 {
77 if (!true)
78 {
79 }
80 global::UnityEngine.Object @object;
81 return @object;
82 }
83
84 // Token: 0x06001A51 RID: 6737 RVA: 0x0006C490 File Offset: 0x0006A690
85 public static void UpdatingLoading()
86 {
87 int num = 1;
88 if (num == 0)
89 {
90 }
91 if (num != 0)
92 {
94 return;
95 }
96 throw new MissingMethodException();
97 }
98
99 // Token: 0x06001A52 RID: 6738 RVA: 0x0006C4B4 File Offset: 0x0006A6B4
105
106 // Token: 0x06001A53 RID: 6739 RVA: 0x0006C4D8 File Offset: 0x0006A6D8
113
114 // Token: 0x06001A54 RID: 6740 RVA: 0x0006C500 File Offset: 0x0006A700
122
123 // Token: 0x06001A55 RID: 6741 RVA: 0x0006C530 File Offset: 0x0006A730
124 private void BeginLoad()
125 {
127 string asset = this._asset2;
129 bool flag = string.IsNullOrEmpty(asset);
132 bool flag2 = string.IsNullOrEmpty(this._asset3);
135 }
136
137 // Token: 0x06001A56 RID: 6742 RVA: 0x0006C594 File Offset: 0x0006A794
138 private bool UpdateLoad()
139 {
140 bool isDone = this._loadRequest.isDone;
142 if (loadRequest != null)
143 {
145 }
147 long num;
148 if (loadRequest2 != null)
149 {
150 num = 0L;
151 bool isDone3 = loadRequest2.isDone;
152 }
153 object lockObject = this._lockObject;
154 Monitor.Enter(lockObject, num != 0L);
156 this._loaded = true;
157 global::UnityEngine.Object asset = loadRequest3.asset;
159 this._resource = asset;
160 if (loadRequest4 != null)
161 {
162 global::UnityEngine.Object asset2 = loadRequest4.asset;
164 }
166 if (loadRequest5 != null)
167 {
168 global::UnityEngine.Object asset3 = loadRequest5.asset;
170 }
172 if (createFunction != null)
173 {
174 global::UnityEngine.Object resource = this._resource;
175 IntPtr method_code = createFunction.method_code;
176 IntPtr invoke_impl = createFunction.invoke_impl;
177 IntPtr method = createFunction.method;
178 this._constructedObject = method_code;
179 }
181 if (createFunction2 != null)
182 {
183 global::UnityEngine.Object resource2 = this._resource;
184 global::UnityEngine.Object resource3 = this._resource2;
185 IntPtr method_code2 = createFunction2.method_code;
186 IntPtr invoke_impl2 = createFunction2.invoke_impl;
189 }
191 if (createFunction3 != null)
192 {
193 global::UnityEngine.Object resource4 = this._resource;
194 global::UnityEngine.Object resource5 = this._resource2;
195 IntPtr method_code3 = createFunction3.method_code;
196 global::UnityEngine.Object resource6 = this._resource3;
197 IntPtr invoke_impl3 = createFunction3.invoke_impl;
200 }
201 long num2 = 0L;
202 if (createFunction3 != null)
203 {
204 Monitor.Exit(lockObject);
205 }
206 if (num2 == 0L)
207 {
208 return true;
209 }
210 throw new OutOfMemoryException();
211 }
212
213 // Token: 0x06001A57 RID: 6743 RVA: 0x0006C738 File Offset: 0x0006A938
214 public global::UnityEngine.Object LoadFromMainThread()
215 {
216 long num = 0L;
217 long num2 = 0L;
218 Thread.Sleep((int)num);
219 object lockObject = this._lockObject;
220 Monitor.Enter(lockObject, num2 != 0L);
221 bool loaded = this._loaded;
222 long num3 = 0L;
223 if (loaded)
224 {
225 Monitor.Exit(lockObject);
226 }
227 if (num3 == 0L)
228 {
229 throw new OutOfMemoryException();
230 }
231 throw new OutOfMemoryException();
232 }
233
234 // Token: 0x06001A58 RID: 6744 RVA: 0x0006C7A0 File Offset: 0x0006A9A0
236 {
237 long num = 0L;
238 long num2 = 0L;
239 Thread.Sleep((int)num);
240 object lockObject = this._lockObject;
241 Monitor.Enter(lockObject, num2 != 0L);
242 bool loaded = this._loaded;
243 long num3 = 0L;
244 if (loaded)
245 {
246 Monitor.Exit(lockObject);
247 }
248 if (num3 == 0L)
249 {
250 return lockObject;
251 }
252 throw new OutOfMemoryException();
253 }
254
255 // Token: 0x06001A59 RID: 6745 RVA: 0x0006C80C File Offset: 0x0006AA0C
256 // Note: this type is marked as 'beforefieldinit'.
258 {
259 }
260
261 // Token: 0x040027C2 RID: 10178
263
264 // Token: 0x040027C3 RID: 10179
266
267 // Token: 0x040027C4 RID: 10180
268 private object _lockObject;
269
270 // Token: 0x040027C5 RID: 10181
271 private readonly string _asset;
272
273 // Token: 0x040027C6 RID: 10182
274 private readonly string _asset2;
275
276 // Token: 0x040027C7 RID: 10183
277 private readonly string _asset3;
278
279 // Token: 0x040027C8 RID: 10184
281
282 // Token: 0x040027C9 RID: 10185
284
285 // Token: 0x040027CA RID: 10186
287
288 // Token: 0x040027CB RID: 10187
289 private global::UnityEngine.Object _resource;
290
291 // Token: 0x040027CC RID: 10188
292 private global::UnityEngine.Object _resource2;
293
294 // Token: 0x040027CD RID: 10189
295 private global::UnityEngine.Object _resource3;
296
297 // Token: 0x040027CE RID: 10190
298 private bool _loaded;
299
300 // Token: 0x040027CF RID: 10191
302
303 // Token: 0x040027D0 RID: 10192
305
306 // Token: 0x040027D1 RID: 10193
308
309 // Token: 0x040027D2 RID: 10194
310 private object _constructedObject;
311
312 // Token: 0x020003C7 RID: 967
313 public sealed class ObjectCreate : MulticastDelegate
314 {
315 // Token: 0x06001A5A RID: 6746 RVA: 0x0006C81C File Offset: 0x0006AA1C
316 public ObjectCreate(object @object, IntPtr method)
317 {
319 this.m_target = @object;
321 this.method_code = this;
322 }
323
324 // Token: 0x06001A5B RID: 6747 RVA: 0x0006C87C File Offset: 0x0006AA7C
325 public object Invoke(global::UnityEngine.Object asset)
326 {
327 /*
328An exception occurred when decompiling this method (06001A5B)
329
330ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object Microsoft.Xna.Framework.Content.ThreadContentRequest/ObjectCreate::Invoke(UnityEngine.Object)
331
332 ---> System.Exception: Basic block has to end with unconditional control flow.
333{
334 Block_0:
335 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:ObjectCreate[exp:Delegate](this)))
336 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:ObjectCreate[exp:Delegate](this)))
337 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:ObjectCreate[exp:Delegate](this)))
338}
339
340 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
341 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
342 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
343 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
344 --- End of inner exception stack trace ---
345 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
346 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
347*/;
348 }
349
350 // Token: 0x06001A5C RID: 6748 RVA: 0x000021DB File Offset: 0x000003DB
351 public IAsyncResult BeginInvoke(global::UnityEngine.Object asset, AsyncCallback callback, object @object)
352 {
353 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
354 }
355
356 // Token: 0x06001A5D RID: 6749 RVA: 0x000021DB File Offset: 0x000003DB
357 public object EndInvoke(IAsyncResult result)
358 {
359 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
360 }
361 }
362
363 // Token: 0x020003C8 RID: 968
364 public sealed class ObjectCreate2 : MulticastDelegate
365 {
366 // Token: 0x06001A5E RID: 6750 RVA: 0x0006C8A0 File Offset: 0x0006AAA0
367 public ObjectCreate2(object @object, IntPtr method)
368 {
370 this.m_target = @object;
372 this.method_code = this;
373 }
374
375 // Token: 0x06001A5F RID: 6751 RVA: 0x0006C900 File Offset: 0x0006AB00
376 public object Invoke(global::UnityEngine.Object asset, global::UnityEngine.Object asset2)
377 {
378 /*
379An exception occurred when decompiling this method (06001A5F)
380
381ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object Microsoft.Xna.Framework.Content.ThreadContentRequest/ObjectCreate2::Invoke(UnityEngine.Object,UnityEngine.Object)
382
383 ---> System.Exception: Basic block has to end with unconditional control flow.
384{
385 Block_0:
386 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:ObjectCreate2[exp:Delegate](this)))
387 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:ObjectCreate2[exp:Delegate](this)))
388}
389
390 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
391 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
392 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
393 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
394 --- End of inner exception stack trace ---
395 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
396 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
397*/;
398 }
399
400 // Token: 0x06001A60 RID: 6752 RVA: 0x000021DB File Offset: 0x000003DB
401 public IAsyncResult BeginInvoke(global::UnityEngine.Object asset, global::UnityEngine.Object asset2, AsyncCallback callback, object @object)
402 {
403 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
404 }
405
406 // Token: 0x06001A61 RID: 6753 RVA: 0x000021DB File Offset: 0x000003DB
407 public object EndInvoke(IAsyncResult result)
408 {
409 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
410 }
411 }
412
413 // Token: 0x020003C9 RID: 969
414 public sealed class ObjectCreate3 : MulticastDelegate
415 {
416 // Token: 0x06001A62 RID: 6754 RVA: 0x0006C91C File Offset: 0x0006AB1C
417 public ObjectCreate3(object @object, IntPtr method)
418 {
420 this.m_target = @object;
422 this.method_code = this;
423 }
424
425 // Token: 0x06001A63 RID: 6755 RVA: 0x0006C97C File Offset: 0x0006AB7C
426 public object Invoke(global::UnityEngine.Object asset, global::UnityEngine.Object asset2, global::UnityEngine.Object asset3)
427 {
428 /*
429An exception occurred when decompiling this method (06001A63)
430
431ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object Microsoft.Xna.Framework.Content.ThreadContentRequest/ObjectCreate3::Invoke(UnityEngine.Object,UnityEngine.Object,UnityEngine.Object)
432
433 ---> System.Exception: Basic block has to end with unconditional control flow.
434{
435 Block_0:
436 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:ObjectCreate3[exp:Delegate](this)))
437 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:ObjectCreate3[exp:Delegate](this)))
438 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:ObjectCreate3[exp:Delegate](this)))
439}
440
441 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
442 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
443 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
444 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
445 --- End of inner exception stack trace ---
446 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
447 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
448*/;
449 }
450
451 // Token: 0x06001A64 RID: 6756 RVA: 0x000021DB File Offset: 0x000003DB
452 public IAsyncResult BeginInvoke(global::UnityEngine.Object asset, global::UnityEngine.Object asset2, global::UnityEngine.Object asset3, AsyncCallback callback, object @object)
453 {
454 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
455 }
456
457 // Token: 0x06001A65 RID: 6757 RVA: 0x000021DB File Offset: 0x000003DB
458 public object EndInvoke(IAsyncResult result)
459 {
460 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
461 }
462 }
463 }
464}
class f__AnonymousType0<< Count > j__TPar
IAsyncResult BeginInvoke(global::UnityEngine.Object asset, global::UnityEngine.Object asset2, AsyncCallback callback, object @object)
object Invoke(global::UnityEngine.Object asset, global::UnityEngine.Object asset2)
object Invoke(global::UnityEngine.Object asset, global::UnityEngine.Object asset2, global::UnityEngine.Object asset3)
IAsyncResult BeginInvoke(global::UnityEngine.Object asset, global::UnityEngine.Object asset2, global::UnityEngine.Object asset3, AsyncCallback callback, object @object)
IAsyncResult BeginInvoke(global::UnityEngine.Object asset, AsyncCallback callback, object @object)
ThreadContentRequest(string asset, [Optional] ThreadContentRequest.ObjectCreate createFunction)
static global::UnityEngine.Object Load(string asset)
static ConcurrentQueue< ThreadContentRequest > _pendingRequests
ThreadContentRequest(string asset, string asset2, [Optional] ThreadContentRequest.ObjectCreate2 createFunction)
ThreadContentRequest(string asset, string asset2, string asset3, [Optional] ThreadContentRequest.ObjectCreate3 createFunction)
static T ConstructOnMainThread< T >(string asset, ThreadContentRequest.ObjectCreate createFunction)
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11
static void Sleep(int millisecondsTimeout)
Definition Thread.cs:207
static ResourceRequest LoadAsync(string path)
Definition Resources.cs:64