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
JsonTypeReflector.cs
Go to the documentation of this file.
1using System;
9
11{
12 // Token: 0x020000B0 RID: 176
13 [Preserve]
14 internal static class JsonTypeReflector
15 {
16 // Token: 0x060006A4 RID: 1700 RVA: 0x0000212A File Offset: 0x0000032A
18 {
19 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
20 }
21
22 // Token: 0x060006A5 RID: 1701 RVA: 0x00011B10 File Offset: 0x0000FD10
24 {
25 !0 !;
26 do
27 {
28 if (!true)
29 {
30 }
31 }
32 while (! != null);
33 Type type2;
34 while (type2 != null)
35 {
36 }
37 }
38
39 // Token: 0x060006A6 RID: 1702 RVA: 0x00011B28 File Offset: 0x0000FD28
41 {
42 do
43 {
44 int num = 1;
45 if (num == 0)
46 {
47 }
48 if (num == 0)
49 {
50 }
51 !0 !;
52 if (! != null)
53 {
54 break;
55 }
56 if (num == 0)
57 {
58 }
59 bool flag;
60 if (!flag)
61 {
62 break;
63 }
64 if (num == 0)
65 {
66 }
68 if (memberInfo2 != null)
69 {
71 }
72 }
73 while (!false);
74 throw new InvalidCastException();
75 }
76
77 // Token: 0x060006A7 RID: 1703 RVA: 0x00011B68 File Offset: 0x0000FD68
79 {
80 if (!true)
81 {
82 }
84 if (jsonObjectAttribute != null)
85 {
87 }
88 if (!true)
89 {
90 }
92 if (dataContractAttribute != null)
93 {
94 return MemberSerialization.OptIn;
95 }
96 if (!true)
97 {
98 }
100 if (serializableAttribute != null)
101 {
102 return MemberSerialization.Fields;
103 }
104 }
105
106 // Token: 0x060006A8 RID: 1704 RVA: 0x00011B94 File Offset: 0x0000FD94
108 {
109 if (!true)
110 {
111 }
113 if (jsonConverterAttribute == null)
114 {
115 return;
116 }
117 if (!true)
118 {
119 }
121 !1 !;
122 if (! != null)
123 {
124 object[] <ConverterParameters>k__BackingField = jsonConverterAttribute.<ConverterParameters>k__BackingField;
125 return 1;
126 }
127 }
128
129 // Token: 0x060006A9 RID: 1705 RVA: 0x00011BC0 File Offset: 0x0000FDC0
131 {
132 if (!true)
133 {
134 }
135 return 1;
136 }
137
138 // Token: 0x060006AA RID: 1706 RVA: 0x00011BD4 File Offset: 0x0000FDD4
140 {
141 /*
142An exception occurred when decompiling this method (060006AA)
143
144ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Func`2<System.Object[],Newtonsoft.Json.JsonConverter> Newtonsoft.Json.Serialization.JsonTypeReflector::GetJsonConverterCreator(System.Type)
145
146 ---> System.Exception: Basic block has to end with unconditional control flow.
147{
148 IL_0003:
149 stloc:ReflectionDelegateFactory(var_1_08, callgetter:ReflectionDelegateFactory(JsonTypeReflector::get_ReflectionDelegateFactory))
150}
151
152 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
153 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
154 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
155 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
156 --- End of inner exception stack trace ---
157 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
158 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
159*/;
160 }
161
162 // Token: 0x060006AB RID: 1707 RVA: 0x00011BEC File Offset: 0x0000FDEC
164 {
165 if (!true)
166 {
167 }
169 return typeConverter;
170 }
171
172 // Token: 0x060006AC RID: 1708 RVA: 0x00011C00 File Offset: 0x0000FE00
174 {
175 /*
176An exception occurred when decompiling this method (060006AC)
177
178ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Type Newtonsoft.Json.Serialization.JsonTypeReflector::GetAssociatedMetadataType(System.Type)
179
180 ---> System.Exception: Basic block has to end with unconditional control flow.
181{
182 IL_0000:
183 brtrue(IL_0000, ldc.i4:bool(1))
184}
185
186 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
187 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
188 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
189 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
190 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
191 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
192 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
193 --- End of inner exception stack trace ---
194 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
195 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
196*/;
197 }
198
199 // Token: 0x060006AD RID: 1709 RVA: 0x00011C10 File Offset: 0x0000FE10
201 {
202 if (!true)
203 {
204 }
207 if ("MetadataClassType" == null || "MetadataClassType" != null)
208 {
209 object obj;
210 if (obj != null)
211 {
212 }
213 throw new InvalidCastException();
214 }
215 throw new ArrayTypeMismatchException();
216 }
217
218 // Token: 0x060006AE RID: 1710 RVA: 0x00011C4C File Offset: 0x0000FE4C
219 private static T GetAttribute<T>(Type type) where T : Attribute
220 {
221 for (;;)
222 {
223 int num = 1;
224 if (num == 0)
225 {
226 }
227 Type type2;
228 if (type2 != null)
229 {
230 if (num == 0)
231 {
232 }
233 if (type2 != null)
234 {
235 continue;
236 }
237 }
238 if (num == 0)
239 {
240 }
241 if (num == 0)
242 {
243 }
244 if (type2 == null)
245 {
246 return;
247 }
248 }
249 }
250
251 // Token: 0x060006AF RID: 1711 RVA: 0x00011C74 File Offset: 0x0000FE74
253 {
254 Type type;
257 while ((type != null && memberInfo2 != null && memberInfo2 != null) || (memberInfo3 != null && memberInfo3 != null))
258 {
259 }
260 }
261
262 // Token: 0x060006B0 RID: 1712 RVA: 0x0000212A File Offset: 0x0000032A
264 {
265 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
266 }
267
268 // Token: 0x17000148 RID: 328
269 // (get) Token: 0x060006B1 RID: 1713 RVA: 0x00011C94 File Offset: 0x0000FE94
270 public static bool DynamicCodeGeneration
271 {
272 get
273 {
274 if (!true)
275 {
276 return;
277 }
278 }
279 }
280
281 // Token: 0x17000149 RID: 329
282 // (get) Token: 0x060006B2 RID: 1714 RVA: 0x00011CA8 File Offset: 0x0000FEA8
283 public static bool FullyTrusted
284 {
285 get
286 {
287 int num = 1;
288 if (num == 0)
289 {
290 }
291 if (num == 0)
292 {
293 return;
294 }
295 }
296 }
297
298 // Token: 0x1700014A RID: 330
299 // (get) Token: 0x060006B3 RID: 1715 RVA: 0x00011CC0 File Offset: 0x0000FEC0
301 {
302 get
303 {
304 if (!true)
305 {
306 }
307 if (!true)
308 {
309 }
310 return 1;
311 }
312 }
313
314 // Token: 0x060006B4 RID: 1716 RVA: 0x00011CD4 File Offset: 0x0000FED4
315 // Note: this type is marked as 'beforefieldinit'.
317 {
318 }
319
320 // Token: 0x040002D7 RID: 727
321 private static bool? _dynamicCodeGeneration;
322
323 // Token: 0x040002D8 RID: 728
324 private static bool? _fullyTrusted;
325
326 // Token: 0x040002D9 RID: 729
327 public const string IdPropertyName = "$id";
328
329 // Token: 0x040002DA RID: 730
330 public const string RefPropertyName = "$ref";
331
332 // Token: 0x040002DB RID: 731
333 public const string TypePropertyName = "$type";
334
335 // Token: 0x040002DC RID: 732
336 public const string ValuePropertyName = "$value";
337
338 // Token: 0x040002DD RID: 733
339 public const string ArrayValuesPropertyName = "$values";
340
341 // Token: 0x040002DE RID: 734
342 public const string ShouldSerializePrefix = "ShouldSerialize";
343
344 // Token: 0x040002DF RID: 735
345 public const string SpecifiedPostfix = "Specified";
346
347 // Token: 0x040002E0 RID: 736
349
350 // Token: 0x040002E1 RID: 737
352
353 // Token: 0x040002E2 RID: 738
355
356 // Token: 0x020000B1 RID: 177
358 private sealed class <>c__DisplayClass18_0
359 {
360 // Token: 0x060006B5 RID: 1717 RVA: 0x00011CE4 File Offset: 0x0000FEE4
362 {
363 }
364
365 // Token: 0x060006B6 RID: 1718 RVA: 0x00011CF8 File Offset: 0x0000FEF8
366 internal JsonConverter <GetJsonConverterCreator>b__0(object[] parameters)
367 {
368 /*
369An exception occurred when decompiling this method (060006B6)
370
371ICSharpCode.Decompiler.DecompilerException: Error decompiling Newtonsoft.Json.JsonConverter Newtonsoft.Json.Serialization.JsonTypeReflector/<>c__DisplayClass18_0::<GetJsonConverterCreator>b__0(System.Object[])
372
373 ---> System.Exception: Basic block has to end with unconditional control flow.
374{
375 IL_0048:
376 stloc:CultureInfo(var_8_50, callgetter:CultureInfo(CultureInfo::get_InvariantCulture))
377 stloc:Type(var_9_58, ldfld:Type('<>c__DisplayClass18_0'::converterType, ldloc:'<>c__DisplayClass18_0'(this)))
378 stloc:string(var_10_68, call:string(StringUtils::FormatWith, ldstr:string("No parameterless constructor defined for '{0}'."), ldloc:CultureInfo[exp:IFormatProvider](var_8_50), ldloc:Type[exp:object](var_9_58)))
379 stloc:int64(var_11_6B, ldc.i4:int64(0))
380 stloc:CultureInfo(var_13_75, callgetter:CultureInfo(CultureInfo::get_InvariantCulture))
381 stloc:Type(var_14_7D, ldfld:Type('<>c__DisplayClass18_0'::converterType, ldloc:'<>c__DisplayClass18_0'(this)))
382 stloc:string(var_15_8D, call:string(StringUtils::FormatWith, ldstr:string("Error creating '{0}'."), ldloc:CultureInfo[exp:IFormatProvider](var_13_75), ldloc:int64[exp:object](var_11_6B)))
383}
384
385 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
386 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
387 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
388 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
389 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
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 1878
391 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
392 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
393 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
394 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
395 --- End of inner exception stack trace ---
396 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
397 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
398*/;
399 }
400
401 // Token: 0x040002E3 RID: 739
402 public Type converterType;
403
404 // Token: 0x040002E4 RID: 740
406 }
407
408 // Token: 0x020000B2 RID: 178
411 private sealed class <>c
412 {
413 // Token: 0x060006B7 RID: 1719 RVA: 0x00011D98 File Offset: 0x0000FF98
414 // Note: this type is marked as 'beforefieldinit'.
415 static <>c()
416 {
417 }
418
419 // Token: 0x060006B8 RID: 1720 RVA: 0x00011DA8 File Offset: 0x0000FFA8
420 public <>c()
421 {
422 }
423
424 // Token: 0x060006B9 RID: 1721 RVA: 0x00011DBC File Offset: 0x0000FFBC
426 {
427 return param.GetType();
428 }
429
430 // Token: 0x040002E5 RID: 741
431 public static readonly JsonTypeReflector.<>c <>9;
432
433 // Token: 0x040002E6 RID: 742
434 public static Func<object, Type> <>9__18_1;
435 }
436 }
437}
class f__AnonymousType0<< Count > j__TPar
static JsonConverter GetJsonConverter(object attributeProvider)
static T GetCachedAttribute< T >(object cpp2il__autoParamName__idx_1)
static MemberSerialization GetObjectMemberSerialization(Type objectType, bool ignoreSerializableAttribute)
static JsonConverter CreateJsonConverterInstance(Type converterType, object[] converterArgs)
static DataMemberAttribute GetDataMemberAttribute(MemberInfo memberInfo)
static TypeConverter GetTypeConverter(Type type)
static readonly ThreadSafeStore< Type, Func< object[], JsonConverter > > JsonConverterCreatorCache
static readonly ThreadSafeStore< Type, Type > AssociatedMetadataTypesCache
static DataContractAttribute GetDataContractAttribute(Type type)
static Func< object[], JsonConverter > GetJsonConverterCreator(Type converterType)
new Type GetType()
Definition Type.cs:287