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
EnumerationExtensions.cs
Go to the documentation of this file.
1using System;
3
4namespace Extensions
5{
6 // Token: 0x020003D3 RID: 979
7 public static class EnumerationExtensions
8 {
9 // Token: 0x06001A8F RID: 6799 RVA: 0x0006CE58 File Offset: 0x0006B058
10 public static T Include<T>(this Enum value, T append)
11 {
12 object obj;
13 do
14 {
15 ulong num2;
16 long num = Convert.ToInt64(num2);
17 if (obj == null)
18 {
19 return;
20 }
21 }
22 while (obj != null);
23 throw new InvalidCastException();
24 }
25
26 // Token: 0x06001A90 RID: 6800 RVA: 0x0006CE7C File Offset: 0x0006B07C
27 public static T Remove<T>(this Enum value, T remove)
28 {
29 object obj;
30 do
31 {
32 ulong num2;
33 long num = Convert.ToInt64(num2);
34 if (obj == null)
35 {
36 return;
37 }
38 }
39 while (obj != null);
40 throw new InvalidCastException();
41 }
42
43 // Token: 0x06001A91 RID: 6801 RVA: 0x0006CEA0 File Offset: 0x0006B0A0
44 public static bool Has<T>(this Enum value, T check)
45 {
46 /*
47An exception occurred when decompiling this method (06001A91)
48
49ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Extensions.EnumerationExtensions::Has<T>(System.Enum,T)
50
51 ---> System.Exception: Basic block has to end with unconditional control flow.
52{
53 Block_0:
54 stloc:uint64(var_3_08, call:uint64(Convert::ToUInt64, ldloc:int64[exp:object](var_2)))
55}
56
57 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
58 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
59 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
60 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
61 --- End of inner exception stack trace ---
62 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
63 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
64*/;
65 }
66
67 // Token: 0x06001A92 RID: 6802 RVA: 0x000021DB File Offset: 0x000003DB
68 public static bool Missing<T>(this Enum obj, T value)
69 {
70 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
71 }
72
73 // Token: 0x020003D4 RID: 980
74 private class _Value
75 {
76 // Token: 0x06001A93 RID: 6803 RVA: 0x0006CEB8 File Offset: 0x0006B0B8
77 public _Value(object value, Type type)
78 {
81 }
82
83 // Token: 0x06001A94 RID: 6804 RVA: 0x0006CEE4 File Offset: 0x0006B0E4
84 // Note: this type is marked as 'beforefieldinit'.
85 static _Value()
86 {
87 if (!true)
88 {
89 }
90 }
91
92 // Token: 0x040027EB RID: 10219
93 private static Type _UInt64;
94
95 // Token: 0x040027EC RID: 10220
96 private static Type _UInt32;
97
98 // Token: 0x040027ED RID: 10221
99 public long? Signed;
100
101 // Token: 0x040027EE RID: 10222
103 }
104 }
105}
class f__AnonymousType0<< Count > j__TPar
static T Remove< T >(this Enum value, T remove)
static bool Has< T >(this Enum value, T check)
static bool Missing< T >(this Enum obj, T value)
static T Include< T >(this Enum value, T append)
static long ToInt64(object value)
Definition Convert.cs:1776
static ulong ToUInt64(object value)
Definition Convert.cs:1908
static Type GetUnderlyingType(Type enumType)
Definition Enum.cs:205