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
EnumUtils.cs
Go to the documentation of this file.
1using System;
8
10{
11 // Token: 0x02000065 RID: 101
12 [Preserve]
13 internal static class EnumUtils
14 {
15 // Token: 0x060003A1 RID: 929 RVA: 0x0000A5A8 File Offset: 0x000087A8
17 {
18 /*
19An exception occurred when decompiling this method (060003A1)
20
21ICSharpCode.Decompiler.DecompilerException: Error decompiling Newtonsoft.Json.Utilities.BidirectionalDictionary`2<System.String,System.String> Newtonsoft.Json.Utilities.EnumUtils::InitializeEnumType(System.Type)
22
23 ---> System.Exception: Basic block has to end with unconditional control flow.
24{
25 IL_000E:
26 stloc:CultureInfo(var_6_16, callgetter:CultureInfo(CultureInfo::get_InvariantCulture))
27}
28
29 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
30 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
31 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
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 88
33 --- End of inner exception stack trace ---
34 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
35 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
36*/;
37 }
38
39 // Token: 0x060003A2 RID: 930 RVA: 0x0000A5CC File Offset: 0x000087CC
40 public static IList<T> GetFlagsValues<T>(T value) where T : struct
41 {
42 return null;
43 }
44
45 // Token: 0x060003A3 RID: 931 RVA: 0x0000A5CC File Offset: 0x000087CC
47 {
48 return null;
49 }
50
51 // Token: 0x060003A4 RID: 932 RVA: 0x0000A5CC File Offset: 0x000087CC
56
57 // Token: 0x060003A5 RID: 933 RVA: 0x0000A5D0 File Offset: 0x000087D0
59 {
60 long num = 0L;
62 if (array != null)
63 {
64 }
65 if (num == 0L)
66 {
67 }
68 throw new OutOfMemoryException();
69 }
70
71 // Token: 0x060003A6 RID: 934 RVA: 0x0000A604 File Offset: 0x00008804
73 {
74 long num = 0L;
76 if (array != null)
77 {
78 }
79 if (num == 0L)
80 {
81 }
82 throw new OutOfMemoryException();
83 }
84
85 // Token: 0x060003A7 RID: 935 RVA: 0x0000A630 File Offset: 0x00008830
86 public static object ParseEnumName(string enumText, bool isNullable, Type t)
87 {
88 string[] array;
89 string text = array.Trim();
90 string text2;
91 if (text2 == null || text2 != null)
92 {
93 string text3 = string.Join(", ", array);
94 if (", " == null)
95 {
96 }
97 object obj;
98 return obj;
99 }
100 throw new ArrayTypeMismatchException();
101 }
102
103 // Token: 0x060003A8 RID: 936 RVA: 0x0000A674 File Offset: 0x00008874
104 public static string ToEnumName(Type enumType, string enumText, bool camelCaseText)
105 {
106 if (!true)
107 {
108 }
109 string[] array;
110 string text = StringUtils.ToCamelCase(array.Trim());
111 if (text == null || text != null)
112 {
113 return string.Join(", ", array);
114 }
115 throw new ArrayTypeMismatchException();
116 }
117
118 // Token: 0x060003A9 RID: 937 RVA: 0x0000212A File Offset: 0x0000032A
120 {
121 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
122 }
123
124 // Token: 0x060003AA RID: 938 RVA: 0x0000A6B4 File Offset: 0x000088B4
125 // Note: this type is marked as 'beforefieldinit'.
126 static EnumUtils()
127 {
128 }
129
130 // Token: 0x040001EA RID: 490
132
133 // Token: 0x02000066 RID: 102
136 private sealed class <>c
137 {
138 // Token: 0x060003AB RID: 939 RVA: 0x0000A6C4 File Offset: 0x000088C4
139 // Note: this type is marked as 'beforefieldinit'.
140 static <>c()
141 {
142 }
143
144 // Token: 0x060003AC RID: 940 RVA: 0x0000A6D4 File Offset: 0x000088D4
145 public <>c()
146 {
147 }
148
149 // Token: 0x060003AD RID: 941 RVA: 0x0000A6E8 File Offset: 0x000088E8
151 {
152 return a.value;
153 }
154
155 // Token: 0x060003AE RID: 942 RVA: 0x0000A6FC File Offset: 0x000088FC
157 {
158 return f.IsLiteral;
159 }
160
161 // Token: 0x060003AF RID: 943 RVA: 0x0000A710 File Offset: 0x00008910
163 {
164 return f.IsLiteral;
165 }
166
167 // Token: 0x040001EB RID: 491
168 public static readonly EnumUtils.<>c <>9;
169
170 // Token: 0x040001EC RID: 492
172
173 // Token: 0x040001ED RID: 493
174 public static Func<FieldInfo, bool> <>9__5_0;
175
176 // Token: 0x040001EE RID: 494
177 public static Func<FieldInfo, bool> <>9__6_0;
178 }
179
180 // Token: 0x02000067 RID: 103
183 private sealed class <>c__2<T> where T : struct
184 {
185 // Token: 0x060003B0 RID: 944 RVA: 0x0000A723 File Offset: 0x00008923
186 // Note: this type is marked as 'beforefieldinit'.
188 {
189 }
190
191 // Token: 0x060003B1 RID: 945 RVA: 0x0000A723 File Offset: 0x00008923
193 {
194 }
195
196 // Token: 0x060003B2 RID: 946 RVA: 0x0000A728 File Offset: 0x00008928
198 {
199 return default(bool);
200 }
201
202 // Token: 0x040001EF RID: 495
203 public static readonly EnumUtils.<>c__2<T> <>9;
204
205 // Token: 0x040001F0 RID: 496
206 public static Func<EnumValue<ulong>, bool> <>9__2_0;
207 }
208 }
209}
class f__AnonymousType0<< Count > j__TPar
static string ToEnumName(Type enumType, string enumText, bool camelCaseText)
Definition EnumUtils.cs:104
static IList< EnumValue< ulong > > GetNamesAndValues< T >()
Definition EnumUtils.cs:46
static object ParseEnumName(string enumText, bool isNullable, Type t)
Definition EnumUtils.cs:86
static IList< object > GetValues(Type enumType)
Definition EnumUtils.cs:58
static IList< string > GetNames(Type enumType)
Definition EnumUtils.cs:72
static readonly ThreadSafeStore< Type, BidirectionalDictionary< string, string > > EnumMemberNamesPerType
Definition EnumUtils.cs:131
static IList< EnumValue< TUnderlyingType > > GetNamesAndValues< TUnderlyingType >(Type enumType)
Definition EnumUtils.cs:52
static string ResolvedEnumName(BidirectionalDictionary< string, string > map, string enumText)
Definition EnumUtils.cs:119
static IList< T > GetFlagsValues< T >(T value)
Definition EnumUtils.cs:40
static BidirectionalDictionary< string, string > InitializeEnumType(Type type)
Definition EnumUtils.cs:16
static string ToCamelCase(string s)