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
BinaryWriter.cs
Go to the documentation of this file.
1using System;
6using System.Text;
7using Mono.Security;
8
9namespace System.IO
10{
11 // Token: 0x02000562 RID: 1378
12 [ComVisible(true)]
15 {
16 // Token: 0x0600293A RID: 10554 RVA: 0x00059528 File Offset: 0x00057728
17 protected BinaryWriter()
18 {
19 if (!true)
20 {
21 }
23 }
24
25 // Token: 0x0600293B RID: 10555 RVA: 0x00059548 File Offset: 0x00057748
26 public BinaryWriter(Stream output)
27 {
28 }
29
30 // Token: 0x0600293C RID: 10556 RVA: 0x00059558 File Offset: 0x00057758
31 public BinaryWriter(Stream output, Encoding encoding)
32 {
33 }
34
35 // Token: 0x0600293D RID: 10557 RVA: 0x00059568 File Offset: 0x00057768
36 public BinaryWriter(Stream output, Encoding encoding, bool leaveOpen)
37 {
38 /*
39An exception occurred when decompiling this method (0600293D)
40
41ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.IO.BinaryWriter::.ctor(System.IO.Stream,System.Text.Encoding,System.Boolean)
42
43 ---> System.Exception: Basic block has to end with unconditional control flow.
44{
45 IL_002A:
46 stloc:string(var_0_34, call:string(Environment::GetResourceString, ldstr:string("Stream was not writable.")))
47}
48
49 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
50 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
51 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
52 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
53 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
54 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
55 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
56 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
57 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
58 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
59 --- End of inner exception stack trace ---
60 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
61 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
62*/;
63 }
64
65 // Token: 0x0600293E RID: 10558 RVA: 0x000595AC File Offset: 0x000577AC
66 public virtual void Close()
67 {
68 }
69
70 // Token: 0x0600293F RID: 10559 RVA: 0x000595BC File Offset: 0x000577BC
71 protected virtual void Dispose(bool disposing)
72 {
74 if (this._leaveOpen)
75 {
76 return;
77 }
78 }
79
80 // Token: 0x06002940 RID: 10560 RVA: 0x000595DC File Offset: 0x000577DC
81 public void Dispose()
82 {
83 }
84
85 // Token: 0x170005F3 RID: 1523
86 // (get) Token: 0x06002941 RID: 10561 RVA: 0x000595EC File Offset: 0x000577EC
87 public virtual Stream BaseStream
88 {
89 get
90 {
91 return this.OutStream;
92 }
93 }
94
95 // Token: 0x06002942 RID: 10562 RVA: 0x00059600 File Offset: 0x00057800
96 public virtual void Flush()
97 {
99 }
100
101 // Token: 0x06002943 RID: 10563 RVA: 0x00059614 File Offset: 0x00057814
102 public virtual long Seek(int offset, SeekOrigin origin)
103 {
104 /*
105An exception occurred when decompiling this method (06002943)
106
107ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 System.IO.BinaryWriter::Seek(System.Int32,System.IO.SeekOrigin)
108
109 ---> System.Exception: Basic block has to end with unconditional control flow.
110{
111 Block_0:
112 stloc:Stream(var_0_06, ldfld:Stream(BinaryWriter::OutStream, ldloc:BinaryWriter(this)))
113}
114
115 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
116 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
117 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
118 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
119 --- End of inner exception stack trace ---
120 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
121 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
122*/;
123 }
124
125 // Token: 0x06002944 RID: 10564 RVA: 0x00059628 File Offset: 0x00057828
126 public virtual void Write(bool value)
127 {
128 byte[] buffer = this._buffer;
130 byte[] buffer2 = this._buffer;
131 }
132
133 // Token: 0x06002945 RID: 10565 RVA: 0x0005964C File Offset: 0x0005784C
134 public virtual void Write(byte value)
135 {
137 }
138
139 // Token: 0x06002946 RID: 10566 RVA: 0x00059660 File Offset: 0x00057860
140 [CLSCompliant(false)]
141 public virtual void Write(sbyte value)
142 {
144 }
145
146 // Token: 0x06002947 RID: 10567 RVA: 0x00059674 File Offset: 0x00057874
147 public virtual void Write(byte[] buffer)
148 {
149 while (buffer == null)
150 {
151 }
153 }
154
155 // Token: 0x06002948 RID: 10568 RVA: 0x0005968C File Offset: 0x0005788C
156 public virtual void Write(byte[] buffer, int index, int count)
157 {
159 }
160
161 // Token: 0x06002949 RID: 10569 RVA: 0x000596A0 File Offset: 0x000578A0
162 public virtual void Write(char ch)
163 {
164 if (!true)
165 {
166 }
167 bool flag = char.IsSurrogate(ch);
168 if (this._buffer != null)
169 {
170 return;
171 }
172 Encoder encoder = this._encoder;
174 byte[] buffer = this._buffer;
175 }
176
177 // Token: 0x0600294A RID: 10570 RVA: 0x000596E4 File Offset: 0x000578E4
178 public virtual void Write(char[] chars)
179 {
180 while (chars == null)
181 {
182 }
183 Encoding encoding = this._encoding;
185 CodePageDataItem dataItem = encoding.dataItem;
186 }
187
188 // Token: 0x0600294B RID: 10571 RVA: 0x0005970C File Offset: 0x0005790C
189 public virtual void Write(double value)
190 {
192 byte[] bytes = BitConverterLE.GetBytes(value);
193 }
194
195 // Token: 0x0600294C RID: 10572 RVA: 0x0005972C File Offset: 0x0005792C
196 public virtual void Write(short value)
197 {
198 byte[] buffer = this._buffer;
199 byte[] buffer2 = this._buffer;
201 byte[] buffer3 = this._buffer;
202 }
203
204 // Token: 0x0600294D RID: 10573 RVA: 0x00059758 File Offset: 0x00057958
205 [CLSCompliant(false)]
206 public virtual void Write(ushort value)
207 {
208 byte[] buffer = this._buffer;
209 byte[] buffer2 = this._buffer;
211 byte[] buffer3 = this._buffer;
212 }
213
214 // Token: 0x0600294E RID: 10574 RVA: 0x00059784 File Offset: 0x00057984
215 public virtual void Write(int value)
216 {
217 byte[] buffer = this._buffer;
218 byte[] buffer2 = this._buffer;
219 byte[] buffer3 = this._buffer;
220 byte[] buffer4 = this._buffer;
222 byte[] buffer5 = this._buffer;
223 }
224
225 // Token: 0x0600294F RID: 10575 RVA: 0x000597C0 File Offset: 0x000579C0
226 [CLSCompliant(false)]
227 public virtual void Write(uint value)
228 {
229 byte[] buffer = this._buffer;
230 byte[] buffer2 = this._buffer;
231 byte[] buffer3 = this._buffer;
232 byte[] buffer4 = this._buffer;
234 byte[] buffer5 = this._buffer;
235 }
236
237 // Token: 0x06002950 RID: 10576 RVA: 0x000597FC File Offset: 0x000579FC
238 public virtual void Write(long value)
239 {
240 byte[] buffer = this._buffer;
241 byte[] buffer2 = this._buffer;
242 byte[] buffer3 = this._buffer;
243 byte[] buffer4 = this._buffer;
244 byte[] buffer5 = this._buffer;
245 byte[] buffer6 = this._buffer;
246 byte[] buffer7 = this._buffer;
247 byte[] buffer8 = this._buffer;
249 byte[] buffer9 = this._buffer;
250 }
251
252 // Token: 0x06002951 RID: 10577 RVA: 0x00059858 File Offset: 0x00057A58
253 [CLSCompliant(false)]
254 public virtual void Write(ulong value)
255 {
256 byte[] buffer = this._buffer;
257 byte[] buffer2 = this._buffer;
258 byte[] buffer3 = this._buffer;
259 byte[] buffer4 = this._buffer;
260 byte[] buffer5 = this._buffer;
261 byte[] buffer6 = this._buffer;
262 byte[] buffer7 = this._buffer;
263 byte[] buffer8 = this._buffer;
265 byte[] buffer9 = this._buffer;
266 }
267
268 // Token: 0x06002952 RID: 10578 RVA: 0x000598B4 File Offset: 0x00057AB4
269 public virtual void Write(float value)
270 {
272 byte[] bytes = BitConverterLE.GetBytes(value);
273 }
274
275 // Token: 0x06002953 RID: 10579 RVA: 0x000598D4 File Offset: 0x00057AD4
276 public virtual void Write(string value)
277 {
278 if (value == null)
279 {
280 throw new OverflowException();
281 }
282 Encoding encoding = this._encoding;
283 this.Write7BitEncodedInt(43155456);
284 if (this._largeByteBuffer == null)
285 {
287 byte[] largeByteBuffer = this._largeByteBuffer;
288 }
289 int stringLength = value._stringLength;
290 int maxChars = this._maxChars;
291 int stringLength2 = value._stringLength;
293 if (this._largeByteBuffer != null)
294 {
295 return;
296 }
297 Encoder encoder = this._encoder;
300 }
301
302 // Token: 0x06002954 RID: 10580 RVA: 0x00059988 File Offset: 0x00057B88
303 protected void Write7BitEncodedInt(int value)
304 {
305 }
306
307 // Token: 0x06002955 RID: 10581 RVA: 0x00059998 File Offset: 0x00057B98
308 // Note: this type is marked as 'beforefieldinit'.
310 {
311 }
312
313 // Token: 0x04001629 RID: 5673
315
316 // Token: 0x0400162A RID: 5674
317 protected Stream OutStream;
318
319 // Token: 0x0400162B RID: 5675
320 private byte[] _buffer;
321
322 // Token: 0x0400162C RID: 5676
324
325 // Token: 0x0400162D RID: 5677
327
328 // Token: 0x0400162E RID: 5678
330 private bool _leaveOpen;
331
332 // Token: 0x0400162F RID: 5679
333 private byte[] _largeByteBuffer;
334
335 // Token: 0x04001630 RID: 5680
336 private int _maxChars;
337 }
338}
class f__AnonymousType0<< Count > j__TPar
static byte[] GetBytes(int value)
virtual void Flush()
virtual void Write(char ch)
virtual void Write(byte value)
virtual void Write(sbyte value)
virtual void Write(float value)
virtual void Write(byte[] buffer, int index, int count)
virtual void Write(short value)
virtual void Write(uint value)
BinaryWriter(Stream output, Encoding encoding, bool leaveOpen)
virtual void Close()
virtual void Dispose(bool disposing)
virtual void Write(double value)
static readonly BinaryWriter Null
virtual Stream BaseStream
BinaryWriter(Stream output)
virtual long Seek(int offset, SeekOrigin origin)
virtual void Write(char[] chars)
virtual void Write(ushort value)
virtual void Write(int value)
void Write7BitEncodedInt(int value)
virtual void Write(long value)
virtual void Write(byte[] buffer)
virtual void Write(ulong value)
virtual void Write(bool value)
BinaryWriter(Stream output, Encoding encoding)
virtual void Write(string value)
CodePageDataItem dataItem
Definition Encoding.cs:1017