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
ParameterizedStrings.cs
Go to the documentation of this file.
1using System;
4
5namespace System
6{
7 // Token: 0x0200018E RID: 398
8 internal static class ParameterizedStrings
9 {
10 // Token: 0x06000F9D RID: 3997 RVA: 0x00021678 File Offset: 0x0001F878
11 public static string Evaluate(string format, params ParameterizedStrings.FormatParam[] args)
12 {
13 while (format == null)
14 {
15 }
16 string text;
17 return text;
18 }
19
20 // Token: 0x06000F9E RID: 3998 RVA: 0x00021690 File Offset: 0x0001F890
22 {
23 for (;;)
24 {
25 string text;
26 int stringLength = text._stringLength;
27 int num = 1;
28 char c = text[num];
29 int num2 = 1;
30 int num3 = 1;
31 string text2 = text.Remove(num2, num3);
33 object @object = formatParam.Object;
34 string text3 = ParameterizedStrings.FormatPrintF(text2, @object);
36 if (formatParam2 == null)
37 {
38 }
40 if (formatParam3 == null)
41 {
42 }
44 if (formatParam4 != null)
45 {
46 }
48 if (formatParam5 != null)
49 {
50 return;
51 }
52 if (formatParam4 == null)
53 {
54 }
56 if (formatParam6 != null)
57 {
58 return;
59 }
60 }
61 }
62
63 // Token: 0x06000F9F RID: 3999 RVA: 0x0000207A File Offset: 0x0000027A
64 private static bool AsBool(int i)
65 {
66 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
67 }
68
69 // Token: 0x06000FA0 RID: 4000 RVA: 0x0000207A File Offset: 0x0000027A
70 private static int AsInt(bool b)
71 {
72 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
73 }
74
75 // Token: 0x06000FA1 RID: 4001 RVA: 0x00021708 File Offset: 0x0001F908
76 private static string StringFromAsciiBytes(byte[] buffer, int offset, int length)
77 {
78 while (offset == 0)
79 {
80 }
81 string text;
82 return text;
83 }
84
85 // Token: 0x06000FA2 RID: 4002
86 private unsafe static extern int snprintf(byte* str, IntPtr size, string format, string arg1);
87
88 // Token: 0x06000FA3 RID: 4003
89 private unsafe static extern int snprintf(byte* str, IntPtr size, string format, int arg1);
90
91 // Token: 0x06000FA4 RID: 4004 RVA: 0x0002171C File Offset: 0x0001F91C
92 private static string FormatPrintF(string format, object arg)
93 {
94 int num;
95 if (num != 0)
96 {
97 int num2;
98 while (num2 != 0)
99 {
100 }
101 }
102 string text;
103 return text;
104 }
105
106 // Token: 0x06000FA5 RID: 4005 RVA: 0x00021744 File Offset: 0x0001F944
110
111 // Token: 0x040006C4 RID: 1732
114
115 // Token: 0x0200018F RID: 399
116 public struct FormatParam
117 {
118 // Token: 0x06000FA6 RID: 4006 RVA: 0x00021758 File Offset: 0x0001F958
119 public FormatParam(int value)
120 {
122 }
123
124 // Token: 0x06000FA7 RID: 4007 RVA: 0x0002176C File Offset: 0x0001F96C
125 private FormatParam(int intValue, string stringValue)
126 {
128 this._string = stringValue;
129 }
130
131 // Token: 0x06000FA8 RID: 4008 RVA: 0x0000207A File Offset: 0x0000027A
132 public static implicit operator ParameterizedStrings.FormatParam(int value)
133 {
134 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
135 }
136
137 // Token: 0x17000165 RID: 357
138 // (get) Token: 0x06000FA9 RID: 4009 RVA: 0x0000207A File Offset: 0x0000027A
139 public int Int32
140 {
141 get
142 {
143 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
144 }
145 }
146
147 // Token: 0x17000166 RID: 358
148 // (get) Token: 0x06000FAA RID: 4010 RVA: 0x00021788 File Offset: 0x0001F988
149 public string String
150 {
151 get
152 {
153 /*
154An exception occurred when decompiling this method (06000FAA)
155
156ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String System.ParameterizedStrings/FormatParam::get_String()
157
158 ---> System.Exception: Basic block has to end with unconditional control flow.
159{
160 IL_0000:
161 brtrue(IL_0000, ldfld:string[exp:bool](FormatParam::_string, ldloc:valuetype System.ParameterizedStrings/FormatParam&(this)))
162}
163
164 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
165 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
166 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
167 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
168 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
169 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
170 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
171 --- End of inner exception stack trace ---
172 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
173 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
174*/;
175 }
176 }
177
178 // Token: 0x17000167 RID: 359
179 // (get) Token: 0x06000FAB RID: 4011 RVA: 0x0002179C File Offset: 0x0001F99C
180 public object Object
181 {
182 get
183 {
184 /*
185An exception occurred when decompiling this method (06000FAB)
186
187ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object System.ParameterizedStrings/FormatParam::get_Object()
188
189 ---> System.Exception: Basic block has to end with unconditional control flow.
190{
191 IL_0000:
192 brtrue(IL_0000, ldfld:string[exp:bool](FormatParam::_string, ldloc:valuetype System.ParameterizedStrings/FormatParam&(this)))
193}
194
195 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
196 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
197 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
198 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
199 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
200 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
201 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
202 --- End of inner exception stack trace ---
203 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
204 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
205*/;
206 }
207 }
208
209 // Token: 0x040006C5 RID: 1733
210 private readonly int _int32;
211
212 // Token: 0x040006C6 RID: 1734
213 private readonly string _string;
214 }
215
216 // Token: 0x02000190 RID: 400
217 private sealed class LowLevelStack
218 {
219 // Token: 0x06000FAC RID: 4012 RVA: 0x000217B0 File Offset: 0x0001F9B0
221 {
222 }
223
224 // Token: 0x06000FAD RID: 4013 RVA: 0x000217C0 File Offset: 0x0001F9C0
226 {
227 /*
228An exception occurred when decompiling this method (06000FAD)
229
230ICSharpCode.Decompiler.DecompilerException: Error decompiling System.ParameterizedStrings/FormatParam System.ParameterizedStrings/LowLevelStack::Pop()
231
232 ---> System.Exception: Basic block has to end with unconditional control flow.
233{
234 Block_0:
235 stloc:valuetype System.ParameterizedStrings/FormatParam[](var_0_06, ldfld:valuetype System.ParameterizedStrings/FormatParam[](LowLevelStack::_arr, ldloc:LowLevelStack(this)))
236}
237
238 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
239 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
240 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
241 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
242 --- End of inner exception stack trace ---
243 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
244 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
245*/;
246 }
247
248 // Token: 0x06000FAE RID: 4014 RVA: 0x000217D4 File Offset: 0x0001F9D4
250 {
252 int count = this._count;
254 int count2 = this._count;
255 }
256
257 // Token: 0x06000FAF RID: 4015 RVA: 0x00021800 File Offset: 0x0001FA00
258 public void Clear()
259 {
261 int count = this._count;
262 long num = 0L;
263 Array.Clear(arr, (int)num, count);
264 }
265
266 // Token: 0x040006C7 RID: 1735
268
269 // Token: 0x040006C8 RID: 1736
270 private int _count;
271 }
272 }
273}
class f__AnonymousType0<< Count > j__TPar
void IList. Clear()
Definition Array.cs:99
void Push(ParameterizedStrings.FormatParam item)
ParameterizedStrings.FormatParam[] _arr
ParameterizedStrings.FormatParam Pop()
static unsafe int snprintf(byte *str, IntPtr size, string format, string arg1)
static string FormatPrintF(string format, object arg)
static string StringFromAsciiBytes(byte[] buffer, int offset, int length)
static ParameterizedStrings.LowLevelStack _cachedStack
static string Evaluate(string format, params ParameterizedStrings.FormatParam[] args)
static string EvaluateInternal(string format, int pos, ParameterizedStrings.FormatParam[] args, ParameterizedStrings.LowLevelStack stack, ParameterizedStrings.FormatParam[] dynamicVars, ParameterizedStrings.FormatParam[] staticVars)
static ParameterizedStrings.FormatParam[] GetDynamicOrStaticVariables(char c, ParameterizedStrings.FormatParam[] dynamicVars, ParameterizedStrings.FormatParam[] staticVars, [Out] int index)
static unsafe int snprintf(byte *str, IntPtr size, string format, int arg1)
FormatParam(int intValue, string stringValue)