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
LocalizedText.cs
Go to the documentation of this file.
1using System;
5using System.Text;
8
10{
11 // Token: 0x02000559 RID: 1369
12 public class LocalizedText
13 {
14 // Token: 0x1700066B RID: 1643
15 // (get) Token: 0x0600333F RID: 13119 RVA: 0x001FEF48 File Offset: 0x001FD148
16 // (set) Token: 0x06003340 RID: 13120 RVA: 0x001FEF5C File Offset: 0x001FD15C
17 public string Value
18 {
20 get
21 {
22 return this.<Value>k__BackingField;
23 }
25 private set
26 {
28 }
29 }
30
31 // Token: 0x06003341 RID: 13121 RVA: 0x001FEF70 File Offset: 0x001FD170
32 internal LocalizedText(string key, string text)
33 {
34 this.Key = key;
36 }
37
38 // Token: 0x06003342 RID: 13122 RVA: 0x001FEF94 File Offset: 0x001FD194
39 internal void SetValue(string text)
40 {
42 }
43
44 // Token: 0x06003343 RID: 13123 RVA: 0x001FEFA8 File Offset: 0x001FD1A8
45 public string FormatWith(object obj)
46 {
47 string text = this.<Value>k__BackingField;
48 if (!true)
49 {
50 }
52 if (!true)
53 {
54 }
55 string text2;
56 return text2;
57 }
58
59 // Token: 0x06003344 RID: 13124 RVA: 0x001FEFCC File Offset: 0x001FD1CC
61 {
62 int num = 1;
63 string text = this.<Value>k__BackingField;
64 StringBuilder stringBuilder = sb.Append(text);
65 if (num == 0)
66 {
67 }
69 while (properties == null)
70 {
71 }
73 return stringBuilder2;
74 }
75
76 // Token: 0x06003345 RID: 13125 RVA: 0x001FF024 File Offset: 0x001FD224
77 public bool CanFormatWith(object obj)
78 {
80 IEnumerator enumerator;
81 Group group;
82 do
83 {
84 if (!true)
85 {
86 }
87 properties = TypeDescriptor.GetProperties(obj);
88 string text = this.<Value>k__BackingField;
90 enumerator = matchCollection.GetEnumerator();
91 if (properties == null || properties == null)
92 {
93 goto IL_003C;
94 }
95 }
96 while (group.<Length>k__BackingField == 0);
97 if (properties != null)
98 {
99 }
101 int <Length>k__BackingField = group2.<Length>k__BackingField;
102 IL_003C:
103 long num = 0L;
104 if (enumerator != null)
105 {
106 }
107 if (num == 0L)
108 {
109 throw new InvalidCastException();
110 }
111 throw new OutOfMemoryException();
112 }
113
114 // Token: 0x06003346 RID: 13126 RVA: 0x001FF09C File Offset: 0x001FD29C
116 {
117 string key = this.Key;
118 if (!true)
119 {
120 }
122 return networkText;
123 }
124
125 // Token: 0x06003347 RID: 13127 RVA: 0x001FF0B4 File Offset: 0x001FD2B4
127 {
128 string key = this.Key;
129 if (!true)
130 {
131 }
133 }
134
135 // Token: 0x06003348 RID: 13128 RVA: 0x000021DB File Offset: 0x000003DB
136 public static explicit operator string(LocalizedText text)
137 {
138 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
139 }
140
141 // Token: 0x06003349 RID: 13129 RVA: 0x001FF0D4 File Offset: 0x001FD2D4
142 public string Format(object arg0)
143 {
144 return string.Format(this.<Value>k__BackingField, arg0);
145 }
146
147 // Token: 0x0600334A RID: 13130 RVA: 0x001FF0F0 File Offset: 0x001FD2F0
148 public string Format(object arg0, object arg1)
149 {
150 return string.Format(this.<Value>k__BackingField, arg0, arg1);
151 }
152
153 // Token: 0x0600334B RID: 13131 RVA: 0x001FF10C File Offset: 0x001FD30C
154 public string Format(object arg0, object arg1, object arg2)
155 {
156 return string.Format(this.<Value>k__BackingField, arg0, arg1, arg2);
157 }
158
159 // Token: 0x0600334C RID: 13132 RVA: 0x001FF128 File Offset: 0x001FD328
160 public string Format(params object[] args)
161 {
162 return string.Format(this.<Value>k__BackingField, args);
163 }
164
165 // Token: 0x0600334D RID: 13133 RVA: 0x001FF144 File Offset: 0x001FD344
166 public override string ToString()
167 {
168 return this.<Value>k__BackingField;
169 }
170
171 // Token: 0x0600334E RID: 13134 RVA: 0x001FF158 File Offset: 0x001FD358
172 // Note: this type is marked as 'beforefieldinit'.
174 {
175 }
176
177 // Token: 0x04003C24 RID: 15396
179
180 // Token: 0x04003C25 RID: 15397
181 private static Regex _substitutionRegex;
182
183 // Token: 0x04003C26 RID: 15398
184 public readonly string Key;
185
186 // Token: 0x04003C27 RID: 15399
188 private string <Value>k__BackingField;
189
190 // Token: 0x0200055A RID: 1370
192 private sealed class <>c__DisplayClass9_0
193 {
194 // Token: 0x0600334F RID: 13135 RVA: 0x001FF168 File Offset: 0x001FD368
196 {
197 }
198
199 // Token: 0x06003350 RID: 13136 RVA: 0x001FF17C File Offset: 0x001FD37C
201 {
202 /*
203An exception occurred when decompiling this method (06003350)
204
205ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String Terraria.Localization.LocalizedText/<>c__DisplayClass9_0::<FormatWith>b__0(System.Text.RegularExpressions.Match)
206
207 ---> System.Exception: Basic block has to end with unconditional control flow.
208{
209 Block_1:
210 stloc:object(var_2_1C, ldfld:object('<>c__DisplayClass9_0'::obj, ldloc:'<>c__DisplayClass9_0'(this)))
211}
212
213 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
214 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
215 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
216 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
217 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
218 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
219 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
220 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
221 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
222 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
223 --- End of inner exception stack trace ---
224 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
225 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
226*/;
227 }
228
229 // Token: 0x04003C28 RID: 15400
230 public PropertyDescriptorCollection properties;
231
232 // Token: 0x04003C29 RID: 15401
233 public object obj;
234 }
235 }
236}
class f__AnonymousType0<< Count > j__TPar
static PropertyDescriptorCollection GetProperties(Type componentType)
StringBuilder Append(char value, int repeatCount)
NetworkText ToNetworkText(params object[] substitutions)
StringBuilder FormatWith(object obj, StringBuilder sb)
string Format(object arg0, object arg1)
LocalizedText(string key, string text)
static readonly LocalizedText Empty
string Format(object arg0, object arg1, object arg2)
string Format(params object[] args)
static NetworkText FromKey(string key, params object[] substitutions)