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
TaskToApm.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x0200021A RID: 538
8 internal static class TaskToApm
9 {
10 // Token: 0x060012E0 RID: 4832 RVA: 0x00027D40 File Offset: 0x00025F40
11 public static IAsyncResult Begin(Task task, AsyncCallback callback, object state)
12 {
13 /*
14An exception occurred when decompiling this method (060012E0)
15
16ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IAsyncResult System.Threading.Tasks.TaskToApm::Begin(System.Threading.Tasks.Task,System.AsyncCallback,System.Object)
17
18 ---> System.Exception: Basic block has to end with unconditional control flow.
19{
20 IL_0014:
21 brtrue(IL_0014, ldloc:Task[exp:bool](task))
22}
23
24 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
25 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
26 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
27 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
28 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
29 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
30 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
31 --- End of inner exception stack trace ---
32 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
33 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
34*/;
35 }
36
37 // Token: 0x060012E1 RID: 4833 RVA: 0x00027D64 File Offset: 0x00025F64
38 public static void End(IAsyncResult asyncResult)
39 {
40 while (asyncResult == null || asyncResult == null)
41 {
42 }
43 }
44
45 // Token: 0x060012E2 RID: 4834 RVA: 0x0000207A File Offset: 0x0000027A
47 {
48 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
49 }
50
51 // Token: 0x060012E3 RID: 4835 RVA: 0x00027D7C File Offset: 0x00025F7C
52 private static void InvokeCallbackWhenTaskCompletes(Task antecedent, AsyncCallback callback, IAsyncResult asyncResult)
53 {
54 }
55
56 // Token: 0x0200021B RID: 539
57 private sealed class TaskWrapperAsyncResult : IAsyncResult
58 {
59 // Token: 0x060012E4 RID: 4836 RVA: 0x00027D8C File Offset: 0x00025F8C
65
66 // Token: 0x170001C6 RID: 454
67 // (get) Token: 0x060012E5 RID: 4837 RVA: 0x00027DB0 File Offset: 0x00025FB0
69 {
70 get
71 {
72 return this._state;
73 }
74 }
75
76 // Token: 0x170001C7 RID: 455
77 // (get) Token: 0x060012E6 RID: 4838 RVA: 0x00027DC4 File Offset: 0x00025FC4
79 {
80 get
81 {
82 return this._completedSynchronously;
83 }
84 }
85
86 // Token: 0x170001C8 RID: 456
87 // (get) Token: 0x060012E7 RID: 4839 RVA: 0x00027DD8 File Offset: 0x00025FD8
89 {
90 get
91 {
92 return this.Task.IsCompleted;
93 }
94 }
95
96 // Token: 0x170001C9 RID: 457
97 // (get) Token: 0x060012E8 RID: 4840 RVA: 0x00027DF0 File Offset: 0x00025FF0
99 {
100 get
101 {
102 /*
103An exception occurred when decompiling this method (060012E8)
104
105ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.WaitHandle System.Threading.Tasks.TaskToApm/TaskWrapperAsyncResult::System.IAsyncResult.get_AsyncWaitHandle()
106
107 ---> System.Exception: Basic block has to end with unconditional control flow.
108{
109 Block_0:
110 stloc:Task(var_0_06, ldfld:Task(TaskWrapperAsyncResult::Task, ldloc:TaskWrapperAsyncResult(this)))
111}
112
113 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
114 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
115 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
116 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
117 --- End of inner exception stack trace ---
118 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
119 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
120*/;
121 }
122 }
123
124 // Token: 0x04000A1D RID: 2589
126
127 // Token: 0x04000A1E RID: 2590
128 private readonly object _state;
129
130 // Token: 0x04000A1F RID: 2591
132 }
133
134 // Token: 0x0200021C RID: 540
136 private sealed class <>c__DisplayClass3_0
137 {
138 // Token: 0x060012E9 RID: 4841 RVA: 0x00027E04 File Offset: 0x00026004
140 {
141 }
142
143 // Token: 0x060012EA RID: 4842 RVA: 0x00027E18 File Offset: 0x00026018
145 {
146 AsyncCallback asyncCallback = this.callback;
147 IAsyncResult asyncResult = this.asyncResult;
148 IntPtr invoke_impl = asyncCallback.invoke_impl;
149 IntPtr method_code = asyncCallback.method_code;
150 IntPtr method = asyncCallback.method;
151 }
152
153 // Token: 0x04000A20 RID: 2592
154 public AsyncCallback callback;
155
156 // Token: 0x04000A21 RID: 2593
157 public IAsyncResult asyncResult;
158 }
159 }
160}
class f__AnonymousType0<< Count > j__TPar
TaskWrapperAsyncResult(Task task, object state, bool completedSynchronously)
Definition TaskToApm.cs:60
static TResult End< TResult >(IAsyncResult cpp2il__autoParamName__idx_1)
Definition TaskToApm.cs:46
static void InvokeCallbackWhenTaskCompletes(Task antecedent, AsyncCallback callback, IAsyncResult asyncResult)
Definition TaskToApm.cs:52
static IAsyncResult Begin(Task task, AsyncCallback callback, object state)
Definition TaskToApm.cs:11
static void End(IAsyncResult asyncResult)
Definition TaskToApm.cs:38