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
CodeWriter.cs
Go to the documentation of this file.
1using System;
2using System.Text;
4
6{
7 // Token: 0x02000074 RID: 116
8 public class CodeWriter
9 {
10 // Token: 0x06000566 RID: 1382 RVA: 0x00010C20 File Offset: 0x0000EE20
11 public CodeWriter()
12 {
13 }
14
15 // Token: 0x06000567 RID: 1383 RVA: 0x00010C34 File Offset: 0x0000EE34
16 public void IncreaseIndent()
17 {
18 int num = this.indent;
19 this.indent = num;
20 }
21
22 // Token: 0x06000568 RID: 1384 RVA: 0x00010C50 File Offset: 0x0000EE50
23 public void DecreaseIndent()
24 {
25 int num = this.indent;
26 this.indent = num;
27 }
28
29 // Token: 0x06000569 RID: 1385 RVA: 0x00010C6C File Offset: 0x0000EE6C
30 public void Append(string code)
31 {
32 }
33
34 // Token: 0x0600056A RID: 1386 RVA: 0x00010C7C File Offset: 0x0000EE7C
35 public void Append(bool trim, string code)
36 {
37 int num = 1;
38 string text = code.Trim();
39 if (num == 0)
40 {
41 }
42 string[] array = Regex.Split(text, "\\r?\\n|\\n");
44 int num2 = this.indent;
45 int num3 = 9;
47 StringBuilder stringBuilder3 = this.stringBuilder.Append(text);
49 int num4 = 10;
51 }
52
53 // Token: 0x0600056B RID: 1387 RVA: 0x00010CEC File Offset: 0x0000EEEC
54 public void AppendLine(string code)
55 {
56 long num = 0L;
57 this.Append(num != 0L, code);
59 }
60
61 // Token: 0x0600056C RID: 1388 RVA: 0x00010D0C File Offset: 0x0000EF0C
62 public void AppendLine(int count)
63 {
65 }
66
67 // Token: 0x0600056D RID: 1389 RVA: 0x00010D20 File Offset: 0x0000EF20
68 public void AppendFormat(string format, params object[] args)
69 {
70 string text = string.Format(format, args);
71 long num = 0L;
72 this.Append(num != 0L, text);
73 }
74
75 // Token: 0x0600056E RID: 1390 RVA: 0x00010D40 File Offset: 0x0000EF40
76 public void AppendLineFormat(string format, params object[] args)
77 {
78 string text = string.Format(format, args);
79 long num = 0L;
80 this.Append(num != 0L, text);
82 }
83
84 // Token: 0x0600056F RID: 1391 RVA: 0x00010D68 File Offset: 0x0000EF68
85 public override string ToString()
86 {
87 /*
88An exception occurred when decompiling this method (0600056F)
89
90ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String InControl.Internal.CodeWriter::ToString()
91
92 ---> System.Exception: Basic block has to end with unconditional control flow.
93{
94 Block_0:
95 stloc:StringBuilder(var_0_06, ldfld:StringBuilder(CodeWriter::stringBuilder, ldloc:CodeWriter(this)))
96}
97
98 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
99 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
100 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
101 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
102 --- End of inner exception stack trace ---
103 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
104 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
105*/;
106 }
107
108 // Token: 0x04000409 RID: 1033
109 private const char newLine = '\n';
110
111 // Token: 0x0400040A RID: 1034
112 private int indent;
113
114 // Token: 0x0400040B RID: 1035
116 }
117}
class f__AnonymousType0<< Count > j__TPar
readonly StringBuilder stringBuilder
void Append(string code)
Definition CodeWriter.cs:30
override string ToString()
Definition CodeWriter.cs:85
void AppendLineFormat(string format, params object[] args)
Definition CodeWriter.cs:76
void AppendLine(string code)
Definition CodeWriter.cs:54
void AppendFormat(string format, params object[] args)
Definition CodeWriter.cs:68
void Append(bool trim, string code)
Definition CodeWriter.cs:35
static string[] Split(string input, string pattern)
Definition Regex.cs:366
StringBuilder Append(char value, int repeatCount)