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
ChatMessage.cs
Go to the documentation of this file.
1using System;
2using System.IO;
6
7namespace Terraria.Chat
8{
9 // Token: 0x0200079A RID: 1946
10 public sealed class ChatMessage
11 {
12 // Token: 0x170007B6 RID: 1974
13 // (get) Token: 0x06003FA3 RID: 16291 RVA: 0x00240FAC File Offset: 0x0023F1AC
14 // (set) Token: 0x06003FA4 RID: 16292 RVA: 0x00240FC0 File Offset: 0x0023F1C0
16 {
18 get
19 {
20 return this.<CommandId>k__BackingField;
21 }
23 private set
24 {
26 }
27 }
28
29 // Token: 0x170007B7 RID: 1975
30 // (get) Token: 0x06003FA5 RID: 16293 RVA: 0x00240FD4 File Offset: 0x0023F1D4
31 // (set) Token: 0x06003FA6 RID: 16294 RVA: 0x00240FE8 File Offset: 0x0023F1E8
32 public string Text
33 {
35 get
36 {
37 return this.<Text>k__BackingField;
38 }
40 set
41 {
42 this.<Text>k__BackingField = value;
43 }
44 }
45
46 // Token: 0x170007B8 RID: 1976
47 // (get) Token: 0x06003FA7 RID: 16295 RVA: 0x00240FFC File Offset: 0x0023F1FC
48 // (set) Token: 0x06003FA8 RID: 16296 RVA: 0x00241010 File Offset: 0x0023F210
49 public bool IsConsumed
50 {
52 get
53 {
54 return this.<IsConsumed>k__BackingField;
55 }
57 private set
58 {
59 }
60 }
61
62 // Token: 0x06003FA9 RID: 16297 RVA: 0x00241020 File Offset: 0x0023F220
63 public ChatMessage(string message)
64 {
67 this.Text = message;
68 }
69
70 // Token: 0x06003FAA RID: 16298 RVA: 0x00241048 File Offset: 0x0023F248
71 private ChatMessage(string message, ChatCommandId commandId)
72 {
74 this.Text = message;
75 }
76
77 // Token: 0x06003FAB RID: 16299 RVA: 0x0024106C File Offset: 0x0023F26C
78 public void Serialize(BinaryWriter writer)
79 {
80 while (this.<IsConsumed>k__BackingField)
81 {
82 }
84 string text = this.<Text>k__BackingField;
85 }
86
87 // Token: 0x06003FAC RID: 16300 RVA: 0x00241090 File Offset: 0x0023F290
89 {
90 /*
91An exception occurred when decompiling this method (06003FAC)
92
93ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.Chat.ChatMessage::GetMaxSerializedSize()
94
95 ---> System.Exception: Basic block has to end with unconditional control flow.
96{
97 Block_0:
98 stloc:ChatCommandId(var_0_0E, ldfld:ChatCommandId(ChatMessage::<CommandId>k__BackingField, ldloc:ChatMessage(this)))
99 stloc:Encoding(var_3_16, callgetter:Encoding(Encoding::get_UTF8))
100 stloc:string(var_4_1D, ldfld:string(ChatMessage::<Text>k__BackingField, ldloc:ChatMessage(this)))
101}
102
103 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
104 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
105 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
106 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
107 --- End of inner exception stack trace ---
108 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
109 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
110*/;
111 }
112
113 // Token: 0x06003FAD RID: 16301 RVA: 0x000021DB File Offset: 0x000003DB
115 {
116 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
117 }
118
119 // Token: 0x06003FAE RID: 16302 RVA: 0x002410BC File Offset: 0x0023F2BC
121 {
122 while (this.<IsConsumed>k__BackingField)
123 {
124 }
126 }
127
128 // Token: 0x06003FAF RID: 16303 RVA: 0x002410D8 File Offset: 0x0023F2D8
130 {
131 while (this.<IsConsumed>k__BackingField)
132 {
133 }
134 }
135
136 // Token: 0x06003FB0 RID: 16304 RVA: 0x002410F0 File Offset: 0x0023F2F0
137 public void Consume()
138 {
139 this.<IsConsumed>k__BackingField = true;
140 }
141
142 // Token: 0x04007DC8 RID: 32200
144 private ChatCommandId <CommandId>k__BackingField;
145
146 // Token: 0x04007DC9 RID: 32201
148 private string <Text>k__BackingField;
149
150 // Token: 0x04007DCA RID: 32202
152 private bool <IsConsumed>k__BackingField;
153 }
154}
class f__AnonymousType0<< Count > j__TPar
ChatMessage(string message, ChatCommandId commandId)
static ChatMessage Deserialize(BinaryReader reader)
void Serialize(BinaryWriter writer)
void SetCommand(ChatCommandId commandId)
ChatCommandId< CommandId > k__BackingField
string< Text > k__BackingField
bool< IsConsumed > k__BackingField
ChatMessage(string message)