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
ValueStringBuilder.cs
Go to the documentation of this file.
1using System;
4
5namespace System.Text
6{
7 // Token: 0x0200000A RID: 10
8 [DefaultMember("Item")]
9 [Obsolete("Types with embedded references are not supported in this version of your compiler.", true)]
10 internal ref struct ValueStringBuilder
11 {
12 // Token: 0x06000040 RID: 64 RVA: 0x00003420 File Offset: 0x00001620
17
18 // Token: 0x17000003 RID: 3
19 // (get) Token: 0x06000041 RID: 65 RVA: 0x00003434 File Offset: 0x00001634
20 public int Length
21 {
22 get
23 {
24 return this._pos;
25 }
26 }
27
28 // Token: 0x06000042 RID: 66 RVA: 0x00003448 File Offset: 0x00001648
29 public override string ToString()
30 {
31 int pos = this._pos;
32 int length = this._chars._length;
34 Span<char> chars = this._chars;
35 string text;
36 return text;
37 }
38
39 // Token: 0x06000043 RID: 67 RVA: 0x0000347C File Offset: 0x0000167C
41 {
42 int pos = this._pos;
43 int length = this._chars._length;
45 Span<char> chars = this._chars;
46 int pos2 = this._pos;
47 return true;
48 }
49
50 // Token: 0x06000044 RID: 68 RVA: 0x000034B8 File Offset: 0x000016B8
51 public void Insert(int index, char value, int count)
52 {
53 int length = this._chars._length;
54 int pos = this._pos;
55 this.Grow(count);
56 int pos2 = this._pos;
57 int length2 = this._chars._length;
59 Span<char> chars = this._chars;
60 int length3 = this._chars._length;
62 int length4 = this._chars._length;
66 int pos3 = this._pos;
68 }
69
70 // Token: 0x06000045 RID: 69 RVA: 0x0000354C File Offset: 0x0000174C
71 public void Append(char c)
72 {
73 int length = this._chars._length;
75 }
76
77 // Token: 0x06000046 RID: 70 RVA: 0x0000357C File Offset: 0x0000177C
78 public void Append(string s)
79 {
80 int stringLength = s._stringLength;
81 int length = this._chars._length;
82 Span<char> chars = this._chars;
83 long num = 0L;
84 char c = s[(int)num];
87 }
88
89 // Token: 0x06000047 RID: 71 RVA: 0x000035C8 File Offset: 0x000017C8
90 private void AppendSlow(string s)
91 {
92 int length = this._chars._length;
93 int stringLength = s._stringLength;
94 this.Grow(stringLength);
95 char rawStringData = s.GetRawStringData();
96 int stringLength2 = s._stringLength;
97 int length2 = this._chars._length;
99 int length3 = this._chars._length;
100 Span<char> chars = this._chars;
101 int pos = this._pos;
102 int stringLength3 = s._stringLength;
103 this._pos = pos;
104 }
105
106 // Token: 0x06000048 RID: 72 RVA: 0x00003640 File Offset: 0x00001840
107 public void Append(char c, int count)
108 {
109 int length = this._chars._length;
110 int pos = this._pos;
111 this.Grow(count);
112 int pos2 = this._pos;
113 int length2 = this._chars._length;
115 Span<char> chars = this._chars;
116 int pos3 = this._pos;
117 this._pos = pos3;
118 }
119
120 // Token: 0x06000049 RID: 73 RVA: 0x0000369C File Offset: 0x0000189C
121 public unsafe void Append(char* value, int length)
122 {
123 int length2 = this._chars._length;
124 int pos = this._pos;
125 this.Grow(length);
126 int pos2 = this._pos;
127 int length3 = this._chars._length;
129 Span<char> chars = this._chars;
130 int pos3 = this._pos;
131 this._pos = pos3;
132 }
133
134 // Token: 0x0600004A RID: 74 RVA: 0x000036F8 File Offset: 0x000018F8
136 {
137 /*
138An exception occurred when decompiling this method (0600004A)
139
140ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Span`1<System.Char> System.Text.ValueStringBuilder::AppendSpan(System.Int32)
141
142 ---> System.Exception: Basic block has to end with unconditional control flow.
143{
144 Block_0:
145 stloc:int32(var_0_0B, ldfld:int32(Span`1::_length, ldfld:valuetype [mscorlib]System.Span`1<char>[exp:valuetype [mscorlib]System.Span`1&](ValueStringBuilder::_chars, ldloc:valuetype System.Text.ValueStringBuilder&(this))))
146 call:void(ValueStringBuilder::Grow, ldloc:valuetype System.Text.ValueStringBuilder&(this), ldloc:int32(length))
147 stloc:int32(var_1_1E, ldfld:int32(Span`1::_length, ldfld:valuetype [mscorlib]System.Span`1<char>[exp:valuetype [mscorlib]System.Span`1&](ValueStringBuilder::_chars, ldloc:valuetype System.Text.ValueStringBuilder&(this))))
148 call:void(ThrowHelper::ThrowArgumentOutOfRangeException)
149 stloc:valuetype [mscorlib]System.Span`1<char>(var_3_2C, ldfld:valuetype [mscorlib]System.Span`1<char>(ValueStringBuilder::_chars, ldloc:valuetype System.Text.ValueStringBuilder&(this)))
150}
151
152 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
153 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
154 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
155 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
156 --- End of inner exception stack trace ---
157 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
158 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
159*/;
160 }
161
162 // Token: 0x0600004B RID: 75 RVA: 0x00003734 File Offset: 0x00001934
163 private void GrowAndAppend(char c)
164 {
165 int num = 1;
166 this.Grow(num);
167 int length = this._chars._length;
169 }
170
171 // Token: 0x0600004C RID: 76 RVA: 0x00003764 File Offset: 0x00001964
173 {
174 int num = 1;
175 if (num == 0)
176 {
177 }
178 if (num == 0)
179 {
180 }
181 int pos = this._pos;
182 int length = this._chars._length;
183 if (num == 0)
184 {
185 }
187 }
188
189 // Token: 0x0600004D RID: 77 RVA: 0x00003798 File Offset: 0x00001998
190 public void Dispose()
191 {
192 }
193
194 // Token: 0x0400001A RID: 26
195 private char[] _arrayToReturnToPool;
196
197 // Token: 0x0400001B RID: 27
198 private Span<char> _chars;
199
200 // Token: 0x0400001C RID: 28
201 private int _pos;
202 }
203}
class f__AnonymousType0<< Count > j__TPar
static byte Max(byte val1, byte val2)
Definition Math.cs:111
static void ThrowArgumentOutOfRangeException()
readonly int _length
Definition Span.cs:240
bool TryCopyTo(Span< char > destination, [Out] int charsWritten)
ValueStringBuilder(Span< char > initialBuffer)
unsafe void Append(char *value, int length)
void Grow(int requiredAdditionalCapacity)
Span< char > AppendSpan(int length)
void Insert(int index, char value, int count)