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
TaskFactory.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x0200022C RID: 556
8 public class TaskFactory<TResult>
9 {
10 // Token: 0x0600134C RID: 4940 RVA: 0x00028624 File Offset: 0x00026824
11 public TaskFactory()
12 {
13 }
14
15 // Token: 0x0600134D RID: 4941 RVA: 0x0000207A File Offset: 0x0000027A
17 {
18 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
19 }
20
21 // Token: 0x0600134E RID: 4942 RVA: 0x00028634 File Offset: 0x00026834
29
30 // Token: 0x0600134F RID: 4943 RVA: 0x00028670 File Offset: 0x00026870
32 {
33 /*
34An exception occurred when decompiling this method (0600134F)
35
36ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task`1<TResult> System.Threading.Tasks.TaskFactory`1::FromAsync(System.Func`3<System.AsyncCallback,System.Object,System.IAsyncResult>,System.Func`2<System.IAsyncResult,TResult>,System.Object)
37
38 ---> System.Exception: Basic block has to end with unconditional control flow.
39{
40 Block_0:
41 stloc:TaskCreationOptions(var_0_06, ldfld:TaskCreationOptions(TaskFactory`1::m_defaultCreationOptions, ldloc:TaskFactory`1(this)))
42}
43
44 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
45 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
46 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
47 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
48 --- End of inner exception stack trace ---
49 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
50 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
51*/;
52 }
53
54 // Token: 0x06001350 RID: 4944 RVA: 0x00028684 File Offset: 0x00026884
56 {
57 int num = 1;
58 if (beginMethod != null || endFunction != null)
59 {
60 if (num == 0)
61 {
62 }
64 if ("TaskFactory.FromAsync: " == null)
65 {
66 }
67 int num2 = 1;
68 if (num2 == 0)
69 {
70 }
71 if (num2 == 0 || num2 == 0)
72 {
73 }
74 if ("TaskFactory.FromAsync: " != null)
75 {
76 }
77 return "beginMethod";
78 }
80 int num3 = 1;
81 if (num3 == 0)
82 {
83 }
84 if (num3 == 0 || num3 == 0)
85 {
86 }
87 throw new OutOfMemoryException();
88 }
89
90 // Token: 0x06001351 RID: 4945 RVA: 0x000286F0 File Offset: 0x000268F0
92 {
93 /*
94An exception occurred when decompiling this method (06001351)
95
96ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task`1<TResult> System.Threading.Tasks.TaskFactory`1::FromAsync<TArg1>(System.Func`4<TArg1,System.AsyncCallback,System.Object,System.IAsyncResult>,System.Func`2<System.IAsyncResult,TResult>,TArg1,System.Object)
97
98 ---> System.Exception: Basic block has to end with unconditional control flow.
99{
100 Block_0:
101 stloc:TaskCreationOptions(var_0_06, ldfld:TaskCreationOptions(TaskFactory`1::m_defaultCreationOptions, ldloc:TaskFactory`1(this)))
102}
103
104 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
105 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
106 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
107 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
108 --- End of inner exception stack trace ---
109 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
110 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
111*/;
112 }
113
114 // Token: 0x06001352 RID: 4946 RVA: 0x00028704 File Offset: 0x00026904
116 {
117 int num = 1;
118 if (beginMethod != null || endFunction != null)
119 {
120 if (num == 0)
121 {
122 }
124 if ("TaskFactory.FromAsync: " == null)
125 {
126 }
127 int num2 = 1;
128 if (num2 == 0)
129 {
130 }
131 if (num2 == 0 || num2 == 0)
132 {
133 }
134 if ("TaskFactory.FromAsync: " != null)
135 {
136 }
137 }
139 int num3 = 1;
140 if (num3 == 0)
141 {
142 }
143 if (num3 == 0 || num3 == 0)
144 {
145 }
146 throw new OutOfMemoryException();
147 }
148
149 // Token: 0x06001353 RID: 4947 RVA: 0x00028768 File Offset: 0x00026968
151 {
152 int num = 1;
153 if (beginMethod != null || endFunction != null)
154 {
155 if (num == 0)
156 {
157 }
159 if ("TaskFactory.FromAsync: " == null)
160 {
161 }
162 int num2 = 1;
163 if (num2 == 0)
164 {
165 }
166 if (num2 == 0 || num2 == 0)
167 {
168 }
169 if ("TaskFactory.FromAsync: " != null)
170 {
171 }
172 return "beginMethod";
173 }
175 int num3 = 1;
176 if (num3 == 0)
177 {
178 }
179 if (num3 == 0 || num3 == 0)
180 {
181 }
182 throw new OutOfMemoryException();
183 }
184
185 // Token: 0x06001354 RID: 4948 RVA: 0x000287D4 File Offset: 0x000269D4
187 {
188 /*
189An exception occurred when decompiling this method (06001354)
190
191ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task`1<TResult> System.Threading.Tasks.TaskFactory`1::FromAsyncTrim<TInstance,TArgs>(TInstance,TArgs,System.Func`5<TInstance,TArgs,System.AsyncCallback,System.Object,System.IAsyncResult>,System.Func`3<TInstance,System.IAsyncResult,TResult>)
192
193 ---> System.Exception: Basic block has to end with unconditional control flow.
194{
195 IL_0000:
196 brtrue(IL_0000, ldc.i4:bool(1))
197}
198
199 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
200 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
201 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
202 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
203 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
204 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
205 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
206 --- End of inner exception stack trace ---
207 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
208 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
209*/;
210 }
211
212 // Token: 0x04000A40 RID: 2624
214
215 // Token: 0x04000A41 RID: 2625
217
218 // Token: 0x04000A42 RID: 2626
220
221 // Token: 0x04000A43 RID: 2627
223
224 // Token: 0x0200022D RID: 557
225 private sealed class FromAsyncTrimPromise<TInstance> : Task<TResult> where TInstance : class
226 {
227 // Token: 0x06001355 RID: 4949 RVA: 0x000287E4 File Offset: 0x000269E4
231
232 // Token: 0x06001356 RID: 4950 RVA: 0x000287F4 File Offset: 0x000269F4
233 internal static void CompleteFromAsyncResult(IAsyncResult asyncResult)
234 {
235 while (asyncResult == null)
236 {
237 }
238 }
239
240 // Token: 0x06001357 RID: 4951 RVA: 0x0002880C File Offset: 0x00026A0C
244
245 // Token: 0x06001358 RID: 4952 RVA: 0x00028820 File Offset: 0x00026A20
246 // Note: this type is marked as 'beforefieldinit'.
248 {
249 }
250
251 // Token: 0x04000A44 RID: 2628
253
254 // Token: 0x04000A45 RID: 2629
255 private TInstance m_thisRef;
256
257 // Token: 0x04000A46 RID: 2630
259 }
260
261 // Token: 0x0200022E RID: 558
263 private sealed class <>c__DisplayClass35_0
264 {
265 // Token: 0x06001359 RID: 4953 RVA: 0x00028830 File Offset: 0x00026A30
267 {
268 }
269
270 // Token: 0x0600135A RID: 4954 RVA: 0x00028844 File Offset: 0x00026A44
272 {
273 }
274
275 // Token: 0x04000A47 RID: 2631
277
278 // Token: 0x04000A48 RID: 2632
280
281 // Token: 0x04000A49 RID: 2633
282 public Task<TResult> promise;
283 }
284
285 // Token: 0x0200022F RID: 559
288 {
289 // Token: 0x0600135B RID: 4955 RVA: 0x00028868 File Offset: 0x00026A68
291 {
292 }
293
294 // Token: 0x0600135C RID: 4956 RVA: 0x0002887C File Offset: 0x00026A7C
296 {
297 }
298
299 // Token: 0x04000A4A RID: 2634
301
302 // Token: 0x04000A4B RID: 2635
304
305 // Token: 0x04000A4C RID: 2636
306 public Task<TResult> promise;
307 }
308
309 // Token: 0x02000230 RID: 560
312 {
313 // Token: 0x0600135D RID: 4957 RVA: 0x000288A0 File Offset: 0x00026AA0
315 {
316 }
317
318 // Token: 0x0600135E RID: 4958 RVA: 0x000288B4 File Offset: 0x00026AB4
320 {
321 }
322
323 // Token: 0x04000A4D RID: 2637
325
326 // Token: 0x04000A4E RID: 2638
328
329 // Token: 0x04000A4F RID: 2639
330 public Task<TResult> promise;
331 }
332 }
333}
class f__AnonymousType0<< Count > j__TPar
void Complete(TInstance thisRef, Func< TInstance, IAsyncResult, TResult > endMethod, IAsyncResult asyncResult, bool requiresSynchronization)
static readonly AsyncCallback s_completeFromAsyncResult
Func< TInstance, IAsyncResult, TResult > m_endMethod
static void CompleteFromAsyncResult(IAsyncResult asyncResult)
FromAsyncTrimPromise(TInstance thisRef, Func< TInstance, IAsyncResult, TResult > endMethod)
Task FromAsync< TArg1 >(Func< TArg1, AsyncCallback, object, IAsyncResult > beginMethod, Action< IAsyncResult > endMethod, TArg1 arg1, object state)
static Task< TResult > FromAsyncImpl(Func< AsyncCallback, object, IAsyncResult > beginMethod, Func< IAsyncResult, TResult > endFunction, Action< IAsyncResult > endAction, object state, TaskCreationOptions creationOptions)
TaskFactory(CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
TaskContinuationOptions m_defaultContinuationOptions
static Task< TResult > FromAsyncImpl< TArg1 >(Func< TArg1, AsyncCallback, object, IAsyncResult > beginMethod, Func< IAsyncResult, TResult > endFunction, Action< IAsyncResult > endAction, TArg1 arg1, object state, TaskCreationOptions creationOptions)
static void FromAsyncCoreLogic(IAsyncResult iar, Func< IAsyncResult, TResult > endFunction, Action< IAsyncResult > endAction, Task< TResult > promise, bool requiresSynchronization)
Task< TResult > FromAsync(Func< AsyncCallback, object, IAsyncResult > beginMethod, Func< IAsyncResult, TResult > endMethod, object state)
TaskCreationOptions m_defaultCreationOptions
static Task< TResult > FromAsyncImpl< TArg1, TArg2 >(Func< TArg1, TArg2, AsyncCallback, object, IAsyncResult > beginMethod, Func< IAsyncResult, TResult > endFunction, Action< IAsyncResult > endAction, TArg1 arg1, TArg2 arg2, object state, TaskCreationOptions creationOptions)
CancellationToken m_defaultCancellationToken
static Task< TResult > FromAsyncTrim< TInstance, TArgs >(TInstance thisRef, TArgs args, Func< TInstance, TArgs, AsyncCallback, object, IAsyncResult > beginMethod, Func< TInstance, IAsyncResult, TResult > endMethod)