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
NetworkText.cs
Go to the documentation of this file.
1using System;
2using System.IO;
3using System.Text;
5
7{
8 // Token: 0x0200055B RID: 1371
9 public class NetworkText
10 {
11 // Token: 0x06003351 RID: 13137 RVA: 0x001FF1A8 File Offset: 0x001FD3A8
13 {
16 }
17
18 // Token: 0x06003352 RID: 13138 RVA: 0x001FF1CC File Offset: 0x001FD3CC
20 {
22 if (networkText == null || networkText != null)
23 {
24 }
26 }
27
28 // Token: 0x06003353 RID: 13139 RVA: 0x001FF1E8 File Offset: 0x001FD3E8
29 public static NetworkText FromFormattable(string text, params object[] substitutions)
30 {
31 /*
32An exception occurred when decompiling this method (06003353)
33
34ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Localization.NetworkText Terraria.Localization.NetworkText::FromFormattable(System.String,System.Object[])
35
36 ---> System.Exception: Basic block has to end with unconditional control flow.
37{
38 IL_0000:
39 brtrue(IL_0000, ldc.i4:bool(1))
40}
41
42 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
43 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
44 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
45 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
46 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
47 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
48 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
49 --- End of inner exception stack trace ---
50 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
51 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
52*/;
53 }
54
55 // Token: 0x06003354 RID: 13140 RVA: 0x000021DB File Offset: 0x000003DB
56 public static NetworkText FromLiteral(string text)
57 {
58 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
59 }
60
61 // Token: 0x06003355 RID: 13141 RVA: 0x001FF1F8 File Offset: 0x001FD3F8
62 public static NetworkText FromKey(string key, params object[] substitutions)
63 {
64 /*
65An exception occurred when decompiling this method (06003355)
66
67ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Localization.NetworkText Terraria.Localization.NetworkText::FromKey(System.String,System.Object[])
68
69 ---> System.Exception: Basic block has to end with unconditional control flow.
70{
71 IL_0000:
72 brtrue(IL_0000, ldc.i4:int32[exp:bool](2))
73}
74
75 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
76 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
77 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
78 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
79 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
80 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
81 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
82 --- End of inner exception stack trace ---
83 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
84 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
85*/;
86 }
87
88 // Token: 0x06003356 RID: 13142 RVA: 0x001FF208 File Offset: 0x001FD408
90 {
92 string text = this._text;
93 int num;
94 if (this._mode != NetworkText.Mode.Literal)
95 {
97 string text2 = substitutions._text;
100 return num;
101 }
102 return num;
103 }
104
105 // Token: 0x06003357 RID: 13143 RVA: 0x001FF254 File Offset: 0x001FD454
106 public void Serialize(BinaryWriter writer)
107 {
109 string text = this._text;
110 this.SerializeSubstitutionList(writer);
111 }
112
113 // Token: 0x06003358 RID: 13144 RVA: 0x001FF278 File Offset: 0x001FD478
115 {
116 if (this._mode != NetworkText.Mode.Literal)
117 {
118 string text = this._substitutions._text;
120 if (substitutions._text != null)
121 {
123 string text2 = this._substitutions._text;
124 }
125 }
126 }
127
128 // Token: 0x06003359 RID: 13145 RVA: 0x000021DB File Offset: 0x000003DB
130 {
131 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
132 }
133
134 // Token: 0x0600335A RID: 13146 RVA: 0x000021DB File Offset: 0x000003DB
136 {
137 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
138 }
139
140 // Token: 0x0600335B RID: 13147 RVA: 0x001FF2C0 File Offset: 0x001FD4C0
142 {
143 if (this._mode != NetworkText.Mode.Literal)
144 {
146 if (networkText != null && networkText == null)
147 {
148 throw new ArrayTypeMismatchException();
149 }
151 }
152 }
153
154 // Token: 0x0600335C RID: 13148 RVA: 0x001FF2F4 File Offset: 0x001FD4F4
155 private void SetToEmptyLiteral()
156 {
157 }
158
159 // Token: 0x0600335D RID: 13149 RVA: 0x001FF304 File Offset: 0x001FD504
160 public override string ToString()
161 {
163 return this._text;
164 }
165
166 // Token: 0x0600335E RID: 13150 RVA: 0x001FF374 File Offset: 0x001FD574
167 private string ToDebugInfoString(string linePrefix = "")
168 {
170 string text = this._text;
172 string textValue = Language.GetTextValue(this._text);
173 string text2 = string.Format("{0}Localized Text: {1}\n", linePrefix, textValue);
174 string text4;
175 string text3 = text4 + text2;
176 string text9;
177 if (this._mode != NetworkText.Mode.Literal)
178 {
179 string text5 = this._substitutions._text;
180 string text7;
181 string text6 = text3 + text7;
183 string text8 = linePrefix + "\t";
184 string text10;
185 text9 = text6 + text10;
187 }
188 return text9;
189 }
190
191 // Token: 0x0600335F RID: 13151 RVA: 0x001FF410 File Offset: 0x001FD610
192 // Note: this type is marked as 'beforefieldinit'.
197
198 // Token: 0x04003C2A RID: 15402
200
201 // Token: 0x04003C2B RID: 15403
203
204 // Token: 0x04003C2C RID: 15404
205 private string _text;
206
207 // Token: 0x04003C2D RID: 15405
209
210 // Token: 0x0200055C RID: 1372
211 private enum Mode : byte
212 {
213 // Token: 0x04003C2F RID: 15407
214 Literal,
215 // Token: 0x04003C30 RID: 15408
217 // Token: 0x04003C31 RID: 15409
219 }
220 }
221}
class f__AnonymousType0<< Count > j__TPar
static Encoding UTF8
Definition Encoding.cs:828
static string GetTextValue(string key)
Definition Language.cs:54
static NetworkText FromFormattable(string text, params object[] substitutions)
string ToDebugInfoString(string linePrefix="")
NetworkText(string text, NetworkText.Mode mode)
void SerializeSubstitutionList(BinaryWriter writer)
static readonly NetworkText Empty
static NetworkText FromLiteral(string text)
void Serialize(BinaryWriter writer)
void DeserializeSubstitutionList(BinaryReader reader)
static NetworkText FromKey(string key, params object[] substitutions)
static NetworkText DeserializeLiteral(BinaryReader reader)
static NetworkText[] ConvertSubstitutionsToNetworkText(object[] substitutions)
static NetworkText Deserialize(BinaryReader reader)