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
MemoryStream.cs
Go to the documentation of this file.
1using System;
5
6namespace System.IO
7{
8 // Token: 0x02000539 RID: 1337
10 public class MemoryStream : Stream
11 {
12 // Token: 0x0600274E RID: 10062 RVA: 0x00055178 File Offset: 0x00053378
13 public MemoryStream()
14 {
15 }
16
17 // Token: 0x0600274F RID: 10063 RVA: 0x00055188 File Offset: 0x00053388
19 {
20 if (!true)
21 {
22 }
23 base..ctor();
24 if (capacity != 0)
25 {
26 return;
27 }
29 }
30
31 // Token: 0x06002750 RID: 10064 RVA: 0x000551B0 File Offset: 0x000533B0
32 public MemoryStream(byte[] buffer)
33 {
34 }
35
36 // Token: 0x06002751 RID: 10065 RVA: 0x000551C0 File Offset: 0x000533C0
37 public MemoryStream(byte[] buffer, bool writable)
38 {
39 do
40 {
41 if (!true)
42 {
43 }
44 base..ctor();
45 }
46 while (buffer == null);
47 this._buffer = buffer;
48 this._writable = true;
49 this._exposable = 256 != 0;
50 }
51
52 // Token: 0x06002752 RID: 10066 RVA: 0x000551F4 File Offset: 0x000533F4
53 public MemoryStream(byte[] buffer, int index, int count)
54 {
55 }
56
57 // Token: 0x06002753 RID: 10067 RVA: 0x00055204 File Offset: 0x00053404
58 public MemoryStream(byte[] buffer, int index, int count, bool writable)
59 {
60 }
61
62 // Token: 0x06002754 RID: 10068 RVA: 0x00055214 File Offset: 0x00053414
63 public MemoryStream(byte[] buffer, int index, int count, bool writable, bool publiclyVisible)
64 {
65 int num = 1;
66 if (num == 0)
67 {
68 }
69 base..ctor();
70 if (buffer != null)
71 {
72 int num2 = 1;
73 this._buffer = buffer;
76 this._writable = num != 0;
77 this._isOpen = num2 != 0;
78 return;
79 }
80 }
81
82 // Token: 0x170005A9 RID: 1449
83 // (get) Token: 0x06002755 RID: 10069 RVA: 0x00055258 File Offset: 0x00053458
84 public override bool CanRead
85 {
86 get
87 {
88 return this._isOpen;
89 }
90 }
91
92 // Token: 0x170005AA RID: 1450
93 // (get) Token: 0x06002756 RID: 10070 RVA: 0x0005526C File Offset: 0x0005346C
94 public override bool CanSeek
95 {
96 get
97 {
98 return this._isOpen;
99 }
100 }
101
102 // Token: 0x170005AB RID: 1451
103 // (get) Token: 0x06002757 RID: 10071 RVA: 0x00055280 File Offset: 0x00053480
104 public override bool CanWrite
105 {
106 get
107 {
108 return this._writable;
109 }
110 }
111
112 // Token: 0x06002758 RID: 10072 RVA: 0x00055294 File Offset: 0x00053494
113 private void EnsureNotClosed()
114 {
115 /*
116An exception occurred when decompiling this method (06002758)
117
118ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.IO.MemoryStream::EnsureNotClosed()
119
120 ---> System.Exception: Basic block has to end with unconditional control flow.
121{
122 IL_0009:
123 stloc:Exception(var_0_0E, call:Exception(Error::GetStreamIsClosed))
124}
125
126 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
127 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
128 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
129 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
130 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
131 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
132 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
133 --- End of inner exception stack trace ---
134 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
135 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
136*/;
137 }
138
139 // Token: 0x06002759 RID: 10073 RVA: 0x000552B0 File Offset: 0x000534B0
140 private void EnsureWriteable()
141 {
142 }
143
144 // Token: 0x0600275A RID: 10074 RVA: 0x000552C4 File Offset: 0x000534C4
145 protected override void Dispose(bool disposing)
146 {
147 }
148
149 // Token: 0x0600275B RID: 10075 RVA: 0x000552D4 File Offset: 0x000534D4
150 private bool EnsureCapacity(int value)
151 {
152 int capacity = this._capacity;
153 return true;
154 }
155
156 // Token: 0x0600275C RID: 10076 RVA: 0x000552EC File Offset: 0x000534EC
157 public override void Flush()
158 {
159 }
160
161 // Token: 0x0600275D RID: 10077 RVA: 0x000552FC File Offset: 0x000534FC
162 public override Task FlushAsync(CancellationToken cancellationToken)
163 {
164 if (!true)
165 {
166 }
167 Task task;
168 return task;
169 }
170
171 // Token: 0x0600275E RID: 10078 RVA: 0x00055318 File Offset: 0x00053518
172 public virtual byte[] GetBuffer()
173 {
174 while (!this._exposable)
175 {
176 }
177 return this._buffer;
178 }
179
180 // Token: 0x0600275F RID: 10079 RVA: 0x00055334 File Offset: 0x00053534
181 internal byte[] InternalGetBuffer()
182 {
183 return this._buffer;
184 }
185
186 // Token: 0x06002760 RID: 10080 RVA: 0x00055348 File Offset: 0x00053548
187 internal int InternalGetPosition()
188 {
189 return this._position;
190 }
191
192 // Token: 0x06002761 RID: 10081 RVA: 0x0005535C File Offset: 0x0005355C
193 internal int InternalReadInt32()
194 {
195 /*
196An exception occurred when decompiling this method (06002761)
197
198ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.IO.MemoryStream::InternalReadInt32()
199
200 ---> System.Exception: Basic block has to end with unconditional control flow.
201{
202 Block_0:
203 call:void(MemoryStream::EnsureNotClosed, ldloc:MemoryStream(this))
204 stloc:int32(var_0_0C, ldfld:int32(MemoryStream::_position, ldloc:MemoryStream(this)))
205 stloc:int32(var_1_13, ldfld:int32(MemoryStream::_capacity, ldloc:MemoryStream(this)))
206 stloc:uint8[](var_2_1A, ldfld:uint8[](MemoryStream::_buffer, ldloc:MemoryStream(this)))
207 stfld:int32(MemoryStream::_position, ldloc:MemoryStream(this), ldloc:uint8[][exp:int32](var_2_1A))
208 stloc:Exception(var_3_27, call:Exception(Error::GetEndOfFile))
209}
210
211 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
212 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
213 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
214 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
215 --- End of inner exception stack trace ---
216 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
217 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
218*/;
219 }
220
221 // Token: 0x06002762 RID: 10082 RVA: 0x00055390 File Offset: 0x00053590
222 internal int InternalEmulateRead(int count)
223 {
224 /*
225An exception occurred when decompiling this method (06002762)
226
227ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.IO.MemoryStream::InternalEmulateRead(System.Int32)
228
229 ---> System.Exception: Basic block has to end with unconditional control flow.
230{
231 Block_0:
232 call:void(MemoryStream::EnsureNotClosed, ldloc:MemoryStream(this))
233 stloc:int32(var_0_0C, ldfld:int32(MemoryStream::_position, ldloc:MemoryStream(this)))
234 stloc:int32(var_1_13, ldfld:int32(MemoryStream::_capacity, ldloc:MemoryStream(this)))
235 stfld:int32(MemoryStream::_position, ldloc:MemoryStream(this), ldloc:int32(var_0_0C))
236}
237
238 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
239 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
240 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
241 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
242 --- End of inner exception stack trace ---
243 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
244 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
245*/;
246 }
247
248 // Token: 0x170005AC RID: 1452
249 // (get) Token: 0x06002763 RID: 10083 RVA: 0x000553B8 File Offset: 0x000535B8
250 // (set) Token: 0x06002764 RID: 10084 RVA: 0x000553D8 File Offset: 0x000535D8
251 public virtual int Capacity
252 {
253 get
254 {
255 /*
256An exception occurred when decompiling this method (06002763)
257
258ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.IO.MemoryStream::get_Capacity()
259
260 ---> System.Exception: Basic block has to end with unconditional control flow.
261{
262 Block_0:
263 call:void(MemoryStream::EnsureNotClosed, ldloc:MemoryStream(this))
264 stloc:int32(var_0_0C, ldfld:int32(MemoryStream::_capacity, ldloc:MemoryStream(this)))
265 stloc:int32(var_1_13, ldfld:int32(MemoryStream::_origin, ldloc:MemoryStream(this)))
266}
267
268 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
269 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
270 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
271 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
272 --- End of inner exception stack trace ---
273 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
274 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
275*/;
276 }
277 set
278 {
279 this.EnsureNotClosed();
280 if (this._expandable || this._expandable)
281 {
282 int capacity = this._capacity;
283 int length = this._length;
284 byte[] buffer = this._buffer;
285 return;
286 }
287 }
288 }
289
290 // Token: 0x170005AD RID: 1453
291 // (get) Token: 0x06002765 RID: 10085 RVA: 0x0005541C File Offset: 0x0005361C
292 public override long Length
293 {
294 get
295 {
296 /*
297An exception occurred when decompiling this method (06002765)
298
299ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 System.IO.MemoryStream::get_Length()
300
301 ---> System.Exception: Basic block has to end with unconditional control flow.
302{
303 Block_0:
304 call:void(MemoryStream::EnsureNotClosed, ldloc:MemoryStream(this))
305 stloc:int32(var_0_0C, ldfld:int32(MemoryStream::_length, ldloc:MemoryStream(this)))
306 stloc:int32(var_1_13, ldfld:int32(MemoryStream::_origin, ldloc:MemoryStream(this)))
307}
308
309 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
310 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
311 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
312 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
313 --- End of inner exception stack trace ---
314 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
315 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
316*/;
317 }
318 }
319
320 // Token: 0x170005AE RID: 1454
321 // (get) Token: 0x06002766 RID: 10086 RVA: 0x0005543C File Offset: 0x0005363C
322 // (set) Token: 0x06002767 RID: 10087 RVA: 0x0005545C File Offset: 0x0005365C
323 public override long Position
324 {
325 get
326 {
327 /*
328An exception occurred when decompiling this method (06002766)
329
330ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 System.IO.MemoryStream::get_Position()
331
332 ---> System.Exception: Basic block has to end with unconditional control flow.
333{
334 Block_0:
335 call:void(MemoryStream::EnsureNotClosed, ldloc:MemoryStream(this))
336 stloc:int32(var_0_0C, ldfld:int32(MemoryStream::_origin, ldloc:MemoryStream(this)))
337 stloc:int32(var_1_13, ldfld:int32(MemoryStream::_length, ldloc:MemoryStream(this)))
338}
339
340 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
341 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
342 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
343 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
344 --- End of inner exception stack trace ---
345 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
346 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
347*/;
348 }
349 set
350 {
351 this.EnsureNotClosed();
352 int origin = this._origin;
353 this._position = origin;
354 }
355 }
356
357 // Token: 0x06002768 RID: 10088 RVA: 0x00055484 File Offset: 0x00053684
358 public override int Read(byte[] buffer, int offset, int count)
359 {
360 if (buffer != null)
361 {
362 this.EnsureNotClosed();
363 int position = this._position;
364 int capacity = this._capacity;
365 Buffer.BlockCopy(this._buffer, position, buffer, offset, count);
366 byte[] buffer2 = this._buffer;
367 int position2 = this._position;
368 byte[] buffer3 = this._buffer;
369 int position3 = this._position;
371 }
372 return "offset";
373 }
374
375 // Token: 0x06002769 RID: 10089 RVA: 0x000554E8 File Offset: 0x000536E8
376 public override int Read(Span<byte> buffer)
377 {
378 Type type;
379 bool flag = base.GetType() != type;
380 return base.Read(buffer);
381 }
382
383 // Token: 0x0600276A RID: 10090 RVA: 0x00055554 File Offset: 0x00053754
384 public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
385 {
386 int num = 1;
387 if (buffer != null)
388 {
389 if (num == 0)
390 {
391 }
392 Task task;
393 return task;
394 }
395 return "offset";
396 }
397
398 // Token: 0x0600276B RID: 10091 RVA: 0x00055588 File Offset: 0x00053788
399 public override ValueTask<int> ReadAsync(Memory<byte> buffer, [Optional] CancellationToken cancellationToken)
400 {
401 Task task;
402 if (task == null)
403 {
404 }
406 Task task2;
407 if (task2 == null)
408 {
409 return;
410 }
411 }
412
413 // Token: 0x0600276C RID: 10092 RVA: 0x000555B4 File Offset: 0x000537B4
414 public override int ReadByte()
415 {
416 /*
417An exception occurred when decompiling this method (0600276C)
418
419ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.IO.MemoryStream::ReadByte()
420
421 ---> System.Exception: Basic block has to end with unconditional control flow.
422{
423 Block_0:
424 call:void(MemoryStream::EnsureNotClosed, ldloc:MemoryStream(this))
425 stloc:int32(var_0_0C, ldfld:int32(MemoryStream::_position, ldloc:MemoryStream(this)))
426 stloc:int32(var_1_13, ldfld:int32(MemoryStream::_capacity, ldloc:MemoryStream(this)))
427 stloc:uint8[](var_2_1A, ldfld:uint8[](MemoryStream::_buffer, ldloc:MemoryStream(this)))
428}
429
430 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
431 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
432 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
433 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
434 --- End of inner exception stack trace ---
435 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
436 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
437*/;
438 }
439
440 // Token: 0x0600276D RID: 10093 RVA: 0x000555DC File Offset: 0x000537DC
441 public override void CopyTo(Stream destination, int bufferSize)
442 {
444 Type type;
445 bool flag = base.GetType() != type;
446 base.CopyTo(destination, bufferSize);
447 }
448
449 // Token: 0x0600276E RID: 10094 RVA: 0x0005563C File Offset: 0x0005383C
450 public override long Seek(long offset, SeekOrigin loc)
451 {
452 /*
453An exception occurred when decompiling this method (0600276E)
454
455ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 System.IO.MemoryStream::Seek(System.Int64,System.IO.SeekOrigin)
456
457 ---> System.Exception: Basic block has to end with unconditional control flow.
458{
459 Block_0:
460 stloc:int32(var_1_15, ldfld:int32(MemoryStream::_origin, ldloc:MemoryStream(this)))
461 stfld:int32(MemoryStream::_position, ldloc:MemoryStream(this), ldloc:int32(var_0_0B))
462}
463
464 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
465 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
466 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
467 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
468 --- End of inner exception stack trace ---
469 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
470 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
471*/;
472 }
473
474 // Token: 0x0600276F RID: 10095 RVA: 0x00055668 File Offset: 0x00053868
475 public override void SetLength(long value)
476 {
477 this.EnsureWriteable();
478 int origin = this._origin;
479 bool flag = this.EnsureCapacity((int)value);
480 int length = this._length;
481 byte[] buffer = this._buffer;
482 int position = this._position;
483 this._length = (int)value;
484 this._position = (int)value;
485 }
486
487 // Token: 0x06002770 RID: 10096 RVA: 0x000556B0 File Offset: 0x000538B0
488 public virtual byte[] ToArray()
489 {
490 int length = this._length;
491 int origin = this._origin;
492 byte[] buffer = this._buffer;
493 int origin2 = this._origin;
494 return buffer;
495 }
496
497 // Token: 0x06002771 RID: 10097 RVA: 0x000556DC File Offset: 0x000538DC
498 public override void Write(byte[] buffer, int offset, int count)
499 {
500 if (buffer != null)
501 {
502 this.EnsureNotClosed();
503 this.EnsureWriteable();
504 int position = this._position;
505 int length = this._length;
506 int capacity = this._capacity;
507 int length2 = this._length;
508 return;
509 }
510 }
511
512 // Token: 0x06002772 RID: 10098 RVA: 0x00055768 File Offset: 0x00053968
513 public override void Write(ReadOnlySpan<byte> buffer)
514 {
515 Type type = base.GetType();
516 Type type2;
517 bool flag = type != type2;
518 base.Write(buffer);
519 }
520
521 // Token: 0x06002773 RID: 10099 RVA: 0x00055804 File Offset: 0x00053A04
522 public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
523 {
524 int num = 1;
525 if (buffer != null)
526 {
527 if (num == 0)
528 {
529 }
530 Task task;
531 return task;
532 }
533 return "offset";
534 }
535
536 // Token: 0x06002774 RID: 10100 RVA: 0x00055828 File Offset: 0x00053A28
537 public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, [Optional] CancellationToken cancellationToken)
538 {
539 Task task;
540 if (task == null)
541 {
542 return;
543 }
544 }
545
546 // Token: 0x06002775 RID: 10101 RVA: 0x00055844 File Offset: 0x00053A44
547 public override void WriteByte(byte value)
548 {
549 this.EnsureNotClosed();
550 this.EnsureWriteable();
551 int position = this._position;
552 int capacity = this._capacity;
553 int capacity2 = this._capacity;
554 }
555
556 // Token: 0x04001583 RID: 5507
557 private byte[] _buffer;
558
559 // Token: 0x04001584 RID: 5508
560 private int _origin;
561
562 // Token: 0x04001585 RID: 5509
563 private int _position;
564
565 // Token: 0x04001586 RID: 5510
566 private int _length;
567
568 // Token: 0x04001587 RID: 5511
569 private int _capacity;
570
571 // Token: 0x04001588 RID: 5512
572 private bool _expandable;
573
574 // Token: 0x04001589 RID: 5513
575 private bool _writable;
576
577 // Token: 0x0400158A RID: 5514
578 private bool _exposable;
579
580 // Token: 0x0400158B RID: 5515
581 private bool _isOpen;
582
583 // Token: 0x0400158C RID: 5516
586 }
587}
class f__AnonymousType0<< Count > j__TPar
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
Definition Buffer.cs:60
override int ReadByte()
override void Flush()
MemoryStream(byte[] buffer, int index, int count)
override long Seek(long offset, SeekOrigin loc)
bool EnsureCapacity(int value)
override Task FlushAsync(CancellationToken cancellationToken)
override Task< int > ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
MemoryStream(byte[] buffer, int index, int count, bool writable)
override bool CanRead
override void SetLength(long value)
override void Write(ReadOnlySpan< byte > buffer)
MemoryStream(int capacity)
int InternalEmulateRead(int count)
MemoryStream(byte[] buffer)
MemoryStream(byte[] buffer, bool writable)
MemoryStream(byte[] buffer, int index, int count, bool writable, bool publiclyVisible)
override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
override ValueTask WriteAsync(ReadOnlyMemory< byte > buffer, [Optional] CancellationToken cancellationToken)
override void Dispose(bool disposing)
override bool CanSeek
override ValueTask< int > ReadAsync(Memory< byte > buffer, [Optional] CancellationToken cancellationToken)
virtual byte[] ToArray()
override void CopyTo(Stream destination, int bufferSize)
virtual byte[] GetBuffer()
override int Read(byte[] buffer, int offset, int count)
override void Write(byte[] buffer, int offset, int count)
override void WriteByte(byte value)
override int Read(Span< byte > buffer)
static void ValidateCopyToArgs(Stream source, Stream destination, int bufferSize)
new Type GetType()
Definition Type.cs:287