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
FileStream.cs
Go to the documentation of this file.
1using System;
7
8namespace System.IO
9{
10 // Token: 0x02000565 RID: 1381
11 [ComVisible(true)]
12 public class FileStream : Stream
13 {
14 // Token: 0x06002968 RID: 10600 RVA: 0x00059CF4 File Offset: 0x00057EF4
15 [Obsolete("Use FileStream(SafeFileHandle handle, FileAccess access, int bufferSize) instead")]
16 public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize)
17 {
18 }
19
20 // Token: 0x06002969 RID: 10601 RVA: 0x00059D08 File Offset: 0x00057F08
21 internal FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync, bool isConsoleWrapper)
22 {
23 this.name = "[Unknown]";
24 if ("[Unknown]" == null)
25 {
26 }
27 base..ctor();
28 if ("[Unknown]" == null)
29 {
30 }
31 }
32
33 // Token: 0x0600296A RID: 10602 RVA: 0x00059D44 File Offset: 0x00057F44
34 public FileStream(string path, FileMode mode)
35 {
36 }
37
38 // Token: 0x0600296B RID: 10603 RVA: 0x00059D54 File Offset: 0x00057F54
40 {
41 }
42
43 // Token: 0x0600296C RID: 10604 RVA: 0x00059D64 File Offset: 0x00057F64
45 {
46 }
47
48 // Token: 0x0600296D RID: 10605 RVA: 0x00059D74 File Offset: 0x00057F74
49 public FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)
50 {
51 }
52
53 // Token: 0x0600296E RID: 10606 RVA: 0x00059D84 File Offset: 0x00057F84
54 public FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync)
55 {
56 }
57
58 // Token: 0x0600296F RID: 10607 RVA: 0x00059D94 File Offset: 0x00057F94
59 public FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)
60 {
61 }
62
63 // Token: 0x06002970 RID: 10608 RVA: 0x00059DA4 File Offset: 0x00057FA4
64 internal FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool isAsync, bool anonymous)
65 {
66 }
67
68 // Token: 0x06002971 RID: 10609 RVA: 0x0000207A File Offset: 0x0000027A
69 internal FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool anonymous, FileOptions options)
70 {
71 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
72 }
73
74 // Token: 0x06002972 RID: 10610 RVA: 0x00059DB4 File Offset: 0x00057FB4
75 private void Init(SafeFileHandle safeHandle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync, bool isConsoleWrapper)
76 {
77 /*
78An exception occurred when decompiling this method (06002972)
79
80ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.IO.FileStream::Init(Microsoft.Win32.SafeHandles.SafeFileHandle,System.IO.FileAccess,System.Boolean,System.Int32,System.Boolean,System.Boolean)
81
82 ---> System.Exception: Basic block has to end with unconditional control flow.
83{
84 IL_0076:
85 stloc:string(var_9_80, call:string(Environment::GetResourceString, ldstr:string("Invalid handle.")))
86}
87
88 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
89 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
90 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
91 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
92 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
93 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
94 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
95 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
96 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
97 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
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 1878
99 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
100 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
101 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
102 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
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 88
104 --- End of inner exception stack trace ---
105 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
106 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
107*/;
108 }
109
110 // Token: 0x170005F5 RID: 1525
111 // (get) Token: 0x06002973 RID: 10611 RVA: 0x00059E44 File Offset: 0x00058044
112 public override bool CanRead
113 {
114 get
115 {
116 /*
117An exception occurred when decompiling this method (06002973)
118
119ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.IO.FileStream::get_CanRead()
120
121 ---> System.Exception: Basic block has to end with unconditional control flow.
122{
123 Block_0:
124 stloc:FileAccess(var_0_06, ldfld:FileAccess(FileStream::access, ldloc:FileStream(this)))
125}
126
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 1852
128 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
129 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
130 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
131 --- End of inner exception stack trace ---
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 92
133 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
134*/;
135 }
136 }
137
138 // Token: 0x170005F6 RID: 1526
139 // (get) Token: 0x06002974 RID: 10612 RVA: 0x00059E58 File Offset: 0x00058058
140 public override bool CanWrite
141 {
142 get
143 {
144 /*
145An exception occurred when decompiling this method (06002974)
146
147ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.IO.FileStream::get_CanWrite()
148
149 ---> System.Exception: Basic block has to end with unconditional control flow.
150{
151 Block_0:
152 stloc:FileAccess(var_0_06, ldfld:FileAccess(FileStream::access, ldloc:FileStream(this)))
153}
154
155 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
156 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
157 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
158 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
159 --- End of inner exception stack trace ---
160 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
161 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
162*/;
163 }
164 }
165
166 // Token: 0x170005F7 RID: 1527
167 // (get) Token: 0x06002975 RID: 10613 RVA: 0x00059E6C File Offset: 0x0005806C
168 public override bool CanSeek
169 {
170 get
171 {
172 return this.canseek;
173 }
174 }
175
176 // Token: 0x170005F8 RID: 1528
177 // (get) Token: 0x06002976 RID: 10614 RVA: 0x00059E80 File Offset: 0x00058080
178 public override long Length
179 {
180 get
181 {
182 bool flag;
183 do
184 {
185 bool isClosed = this.safeHandle.IsClosed;
186 flag = this.buf_dirty;
187 if (flag)
188 {
189 this.FlushBuffer();
190 }
192 if (!flag)
193 {
194 }
195 }
196 while (flag);
197 long num;
198 return num;
199 }
200 }
201
202 // Token: 0x170005F9 RID: 1529
203 // (get) Token: 0x06002977 RID: 10615 RVA: 0x00059EB8 File Offset: 0x000580B8
204 // (set) Token: 0x06002978 RID: 10616 RVA: 0x00059EF8 File Offset: 0x000580F8
205 public override long Position
206 {
207 get
208 {
209 /*
210An exception occurred when decompiling this method (06002977)
211
212ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 System.IO.FileStream::get_Position()
213
214 ---> System.Exception: Basic block has to end with unconditional control flow.
215{
216 IL_002B:
217 stloc:string(var_6_32, ldfld:string(Exception::_source, ldloc:Exception(var_5)))
218}
219
220 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
221 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
222 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
223 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
224 --- End of inner exception stack trace ---
225 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
226 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
227*/;
228 }
229 set
230 {
231 }
232 }
233
234 // Token: 0x170005FA RID: 1530
235 // (get) Token: 0x06002979 RID: 10617 RVA: 0x00059F10 File Offset: 0x00058110
237 {
238 get
239 {
240 if (!this.isExposed)
241 {
242 this.isExposed = true;
243 this.FlushBuffer();
244 long num = 0L;
245 this.InitBuffer((int)num, true);
246 }
247 return this.safeHandle;
248 }
249 }
250
251 // Token: 0x0600297A RID: 10618 RVA: 0x00059F44 File Offset: 0x00058144
252 private void ExposeHandle()
253 {
254 this.isExposed = true;
255 this.FlushBuffer();
256 long num = 0L;
257 this.InitBuffer((int)num, true);
258 }
259
260 // Token: 0x0600297B RID: 10619 RVA: 0x00059F68 File Offset: 0x00058168
261 public override int ReadByte()
262 {
263 bool isClosed = this.safeHandle.IsClosed;
264 int num3;
265 if (this.buf_size != 0)
266 {
267 int num = this.buf_length;
268 long num2 = this.buf_start;
269 this.RefillBuffer();
270 if (this.buf_length == 0)
271 {
272 return num3;
273 }
274 int num4 = this.buf_offset;
275 byte[] array = this.buf;
276 }
278 byte[] array2 = this.buf;
279 int num5 = 1;
280 long num6 = 0L;
281 num3 = this.ReadData(safeFileHandle, array2, (int)num6, num5);
282 if (num3 != 0)
283 {
284 byte[] array3 = this.buf;
285 return num3;
286 }
287 return num3;
288 }
289
290 // Token: 0x0600297C RID: 10620 RVA: 0x00059FEC File Offset: 0x000581EC
291 public override void WriteByte(byte value)
292 {
293 bool isClosed = this.safeHandle.IsClosed;
294 int num = this.buf_offset;
295 int num2 = this.buf_size;
296 this.FlushBuffer();
297 int num3 = this.buf_size;
298 byte[] array = this.buf;
299 if (num3 != 0)
300 {
301 int num4 = this.buf_length;
302 long num5 = this.buf_start;
303 this.buf_length = (int)num5;
304 int num6 = 1;
305 this.buf_dirty = num6 != 0;
306 return;
307 }
308 int num7 = 1;
309 this.buf_dirty = num7 != 0;
311 this.FlushBuffer();
312 }
313
314 // Token: 0x0600297D RID: 10621 RVA: 0x0005A06C File Offset: 0x0005826C
315 public override int Read([In] [Out] byte[] array, int offset, int count)
316 {
317 bool isClosed = this.safeHandle.IsClosed;
318 if (array != null)
319 {
320 if (this.async)
321 {
322 }
323 return this.ReadInternal(array, offset, count);
324 }
325 return "offset";
326 }
327
328 // Token: 0x0600297E RID: 10622 RVA: 0x0005A0A8 File Offset: 0x000582A8
329 private int ReadInternal(byte[] dest, int offset, int count)
330 {
331 int num = this.ReadSegment(dest, offset, count);
332 int num2 = this.buf_size;
333 this.FlushBuffer();
335 int num3 = this.ReadData(safeFileHandle, dest, count, count);
336 long num4 = this.buf_start;
338 return num3;
339 }
340
341 // Token: 0x0600297F RID: 10623 RVA: 0x0005A0F4 File Offset: 0x000582F4
343 {
344 bool isClosed = this.safeHandle.IsClosed;
345 if (array == null)
346 {
347 return "numBytes";
348 }
349 if (this.async)
350 {
351 IAsyncResult asyncResult;
352 return asyncResult;
353 }
354 return base.BeginRead(array, offset, numBytes, userCallback, stateObject);
355 }
356
357 // Token: 0x06002980 RID: 10624 RVA: 0x0005A130 File Offset: 0x00058330
358 public override int EndRead(IAsyncResult asyncResult)
359 {
360 while (asyncResult == null || (this.async && asyncResult == null))
361 {
362 }
363 return base.EndRead(asyncResult);
364 }
365
366 // Token: 0x06002981 RID: 10625 RVA: 0x0005A154 File Offset: 0x00058354
367 public override void Write(byte[] array, int offset, int count)
368 {
369 bool isClosed = this.safeHandle.IsClosed;
370 if (array == null)
371 {
372 return;
373 }
374 if (this.async)
375 {
376 return;
377 }
378 this.WriteInternal(array, offset, count);
379 }
380
381 // Token: 0x06002982 RID: 10626 RVA: 0x0005A188 File Offset: 0x00058388
382 private void WriteInternal(byte[] src, int offset, int count)
383 {
384 /*
385An exception occurred when decompiling this method (06002982)
386
387ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.IO.FileStream::WriteInternal(System.Byte[],System.Int32,System.Int32)
388
389 ---> System.Exception: Basic block has to end with unconditional control flow.
390{
391 IL_005C:
392 stloc:string(var_9_62, ldfld:string(FileStream::name, ldloc:FileStream(this)))
393 stloc:string(var_10_6C, call:string(FileStream::GetSecureFileName, ldloc:FileStream(this), ldloc:string(var_9_62)))
394}
395
396 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
397 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
398 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
399 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
400 --- End of inner exception stack trace ---
401 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
402 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
403*/;
404 }
405
406 // Token: 0x06002983 RID: 10627 RVA: 0x0005A204 File Offset: 0x00058404
408 {
409 bool isClosed = this.safeHandle.IsClosed;
410 if (array == null)
411 {
412 return "numBytes";
413 }
414 if (this.async)
415 {
416 IAsyncResult asyncResult;
417 return asyncResult;
418 }
419 return base.BeginWrite(array, offset, numBytes, userCallback, stateObject);
420 }
421
422 // Token: 0x06002984 RID: 10628 RVA: 0x0005A240 File Offset: 0x00058440
423 public override void EndWrite(IAsyncResult asyncResult)
424 {
425 while (asyncResult == null)
426 {
427 }
428 if (!this.async)
429 {
430 base.EndWrite(asyncResult);
431 return;
432 }
433 if (asyncResult != null)
434 {
435 return;
436 }
437 }
438
439 // Token: 0x06002985 RID: 10629 RVA: 0x0005A264 File Offset: 0x00058464
440 public override long Seek(long offset, SeekOrigin origin)
441 {
442 long num;
443 long num2;
444 do
445 {
446 bool isClosed = this.safeHandle.IsClosed;
447 if (origin != SeekOrigin.Begin)
448 {
449 }
450 num = this.append_startpos;
451 this.FlushBuffer();
453 if (num == 0L)
454 {
455 }
457 }
458 while (num != 0L);
459 return num2;
460 }
461
462 // Token: 0x06002986 RID: 10630 RVA: 0x0005A2A8 File Offset: 0x000584A8
463 public override void SetLength(long value)
464 {
465 bool isClosed = this.safeHandle.IsClosed;
466 this.FlushBuffer();
468 }
469
470 // Token: 0x06002987 RID: 10631 RVA: 0x0005A2E4 File Offset: 0x000584E4
471 public override void Flush()
472 {
473 bool isClosed = this.safeHandle.IsClosed;
474 this.FlushBuffer();
475 }
476
477 // Token: 0x06002988 RID: 10632 RVA: 0x0005A304 File Offset: 0x00058504
478 protected override void Finalize()
479 {
480 base.Finalize();
481 }
482
483 // Token: 0x06002989 RID: 10633 RVA: 0x0005A338 File Offset: 0x00058538
484 protected override void Dispose(bool disposing)
485 {
487 long num;
488 if (safeFileHandle != null)
489 {
491 this.FlushBuffer();
492 if (this.owner)
493 {
495 IntPtr handle = safeFileHandle2.handle;
496 if (safeFileHandle2 == null)
497 {
499 return;
500 }
501 goto IL_007C;
502 }
503 }
504 else
505 {
506 num = 0L;
507 }
508 if (this.buf == null)
509 {
510 }
511 GC.SuppressFinalize(this);
512 if (num == 0L)
513 {
514 return;
515 }
516 IL_007C:
517 string text = this.name;
518 string secureFileName = this.GetSecureFileName(text);
519 throw new OutOfMemoryException();
520 }
521
522 // Token: 0x0600298A RID: 10634 RVA: 0x0005A3F8 File Offset: 0x000585F8
523 public override Task FlushAsync(CancellationToken cancellationToken)
524 {
525 bool isClosed = this.safeHandle.IsClosed;
526 return base.FlushAsync(cancellationToken);
527 }
528
529 // Token: 0x0600298B RID: 10635 RVA: 0x0005A418 File Offset: 0x00058618
530 public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
531 {
532 return base.ReadAsync(buffer, offset, count, cancellationToken);
533 }
534
535 // Token: 0x0600298C RID: 10636 RVA: 0x0005A430 File Offset: 0x00058630
536 public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
537 {
538 return base.WriteAsync(buffer, offset, count, cancellationToken);
539 }
540
541 // Token: 0x0600298D RID: 10637 RVA: 0x0005A448 File Offset: 0x00058648
542 private int ReadSegment(byte[] dest, int dest_offset, int count)
543 {
544 int num = 1;
545 int num2 = this.buf_length;
546 long num3 = this.buf_start;
547 if (num == 0)
548 {
549 }
550 byte[] array = this.buf;
551 int num4 = this.buf_offset;
552 int num5;
554 int num6 = this.buf_offset;
556 return num5;
557 }
558
559 // Token: 0x0600298E RID: 10638 RVA: 0x0005A498 File Offset: 0x00058698
560 private int WriteSegment(byte[] src, int src_offset, int count)
561 {
562 /*
563An exception occurred when decompiling this method (0600298E)
564
565ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.IO.FileStream::WriteSegment(System.Byte[],System.Int32,System.Int32)
566
567 ---> System.Exception: Basic block has to end with unconditional control flow.
568{
569 Block_0:
570 stloc:int32(var_0_06, ldfld:int32(FileStream::buf_size, ldloc:FileStream(this)))
571 stloc:int32(var_1_0D, ldfld:int32(FileStream::buf_offset, ldloc:FileStream(this)))
572 stloc:uint8[](var_2_14, ldfld:uint8[](FileStream::buf, ldloc:FileStream(this)))
573 stloc:int32(var_3_1B, ldfld:int32(FileStream::buf_length, ldloc:FileStream(this)))
574 stloc:int64(var_4_22, ldfld:int64(FileStream::buf_start, ldloc:FileStream(this)))
575 stfld:int32(FileStream::buf_offset, ldloc:FileStream(this), ldloc:int64[exp:int32](var_4_22))
576 stfld:int32(FileStream::buf_length, ldloc:FileStream(this), ldloc:int64[exp:int32](var_4_22))
577 stloc:int32(var_5_35, ldc.i4:int32(1))
578 stfld:bool(FileStream::buf_dirty, ldloc:FileStream(this), ldloc:int32[exp:bool](var_5_35))
579}
580
581 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
582 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
583 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
584 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
585 --- End of inner exception stack trace ---
586 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
587 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
588*/;
589 }
590
591 // Token: 0x0600298F RID: 10639 RVA: 0x0005A4E4 File Offset: 0x000586E4
592 private void FlushBuffer()
593 {
594 /*
595An exception occurred when decompiling this method (0600298F)
596
597ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.IO.FileStream::FlushBuffer()
598
599 ---> System.Exception: Basic block has to end with unconditional control flow.
600{
601 IL_005E:
602 stloc:string(var_10_64, ldfld:string(FileStream::name, ldloc:FileStream(this)))
603 stloc:string(var_11_6E, call:string(FileStream::GetSecureFileName, ldloc:FileStream(this), ldloc:string(var_10_64)))
604}
605
606 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
607 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
608 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
609 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
610 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
611 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
612 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
613 --- End of inner exception stack trace ---
614 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
615 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
616*/;
617 }
618
619 // Token: 0x06002990 RID: 10640 RVA: 0x0005A560 File Offset: 0x00058760
620 private void FlushBufferIfDirty()
621 {
622 if (this.buf_dirty)
623 {
624 this.FlushBuffer();
625 return;
626 }
627 }
628
629 // Token: 0x06002991 RID: 10641 RVA: 0x0005A57C File Offset: 0x0005877C
630 private void RefillBuffer()
631 {
632 this.FlushBuffer();
634 byte[] array = this.buf;
635 int num = this.buf_size;
636 long num2 = 0L;
637 int num3 = this.ReadData(safeFileHandle, array, (int)num2, num);
639 }
640
641 // Token: 0x06002992 RID: 10642 RVA: 0x0005A5BC File Offset: 0x000587BC
642 private int ReadData(SafeHandle safeHandle, byte[] buf, int offset, int count)
643 {
644 /*
645An exception occurred when decompiling this method (06002992)
646
647ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.IO.FileStream::ReadData(System.Runtime.InteropServices.SafeHandle,System.Byte[],System.Int32,System.Int32)
648
649 ---> System.Exception: Basic block has to end with unconditional control flow.
650{
651 Block_0:
652 stloc:string(var_2_08, ldfld:string(FileStream::name, ldloc:FileStream(this)))
653 stloc:string(var_3_10, call:string(FileStream::GetSecureFileName, ldloc:FileStream(this), ldloc:string(var_2_08)))
654}
655
656 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
657 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
658 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
659 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
660 --- End of inner exception stack trace ---
661 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
662 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
663*/;
664 }
665
666 // Token: 0x06002993 RID: 10643 RVA: 0x0005A5DC File Offset: 0x000587DC
667 private void InitBuffer(int size, bool isZeroSize)
668 {
669 }
670
671 // Token: 0x06002994 RID: 10644 RVA: 0x0005A644 File Offset: 0x00058844
672 private string GetSecureFileName(string filename)
673 {
674 bool flag = this.anonymous;
675 if (!true)
676 {
677 }
678 string fileName;
679 if (flag)
680 {
681 fileName = Path.GetFileName(filename);
682 return fileName;
683 }
684 return Path.GetFullPath(fileName);
685 }
686
687 // Token: 0x06002995 RID: 10645 RVA: 0x0005A670 File Offset: 0x00058870
688 private string GetSecureFileName(string filename, bool full)
689 {
690 if (this.anonymous)
691 {
692 return Path.GetFileName(filename);
693 }
694 return Path.GetFullPath(filename);
695 }
696
697 // Token: 0x06002996 RID: 10646 RVA: 0x0005A694 File Offset: 0x00058894
698 // Note: this type is marked as 'beforefieldinit'.
699 static FileStream()
700 {
701 }
702
703 // Token: 0x04001637 RID: 5687
704 private static byte[] buf_recycle;
705
706 // Token: 0x04001638 RID: 5688
707 private static readonly object buf_recycle_lock;
708
709 // Token: 0x04001639 RID: 5689
710 private byte[] buf;
711
712 // Token: 0x0400163A RID: 5690
713 private string name;
714
715 // Token: 0x0400163B RID: 5691
717
718 // Token: 0x0400163C RID: 5692
719 private bool isExposed;
720
721 // Token: 0x0400163D RID: 5693
722 private long append_startpos;
723
724 // Token: 0x0400163E RID: 5694
726
727 // Token: 0x0400163F RID: 5695
728 private bool owner;
729
730 // Token: 0x04001640 RID: 5696
731 private bool async;
732
733 // Token: 0x04001641 RID: 5697
734 private bool canseek;
735
736 // Token: 0x04001642 RID: 5698
737 private bool anonymous;
738
739 // Token: 0x04001643 RID: 5699
740 private bool buf_dirty;
741
742 // Token: 0x04001644 RID: 5700
743 private int buf_size;
744
745 // Token: 0x04001645 RID: 5701
746 private int buf_length;
747
748 // Token: 0x04001646 RID: 5702
749 private int buf_offset;
750
751 // Token: 0x04001647 RID: 5703
752 private long buf_start;
753
754 // Token: 0x02000566 RID: 1382
755 private sealed class ReadDelegate : MulticastDelegate
756 {
757 // Token: 0x06002997 RID: 10647 RVA: 0x0005A6A4 File Offset: 0x000588A4
758 public ReadDelegate(object @object, IntPtr method)
759 {
761 this.m_target = @object;
763 this.method_code = this;
764 }
765
766 // Token: 0x06002998 RID: 10648 RVA: 0x0005A6F8 File Offset: 0x000588F8
767 public int Invoke(byte[] buffer, int offset, int count)
768 {
769 /*
770An exception occurred when decompiling this method (06002998)
771
772ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.IO.FileStream/ReadDelegate::Invoke(System.Byte[],System.Int32,System.Int32)
773
774 ---> System.Exception: Basic block has to end with unconditional control flow.
775{
776 Block_0:
777 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:ReadDelegate[exp:Delegate](this)))
778 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:ReadDelegate[exp:Delegate](this)))
779 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:ReadDelegate[exp:Delegate](this)))
780}
781
782 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
783 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
784 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
785 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
786 --- End of inner exception stack trace ---
787 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
788 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
789*/;
790 }
791
792 // Token: 0x06002999 RID: 10649 RVA: 0x0000207A File Offset: 0x0000027A
793 public IAsyncResult BeginInvoke(byte[] buffer, int offset, int count, AsyncCallback callback, object @object)
794 {
795 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
796 }
797
798 // Token: 0x0600299A RID: 10650 RVA: 0x0000207A File Offset: 0x0000027A
799 public int EndInvoke(IAsyncResult result)
800 {
801 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
802 }
803 }
804
805 // Token: 0x02000567 RID: 1383
806 private sealed class WriteDelegate : MulticastDelegate
807 {
808 // Token: 0x0600299B RID: 10651 RVA: 0x0005A71C File Offset: 0x0005891C
809 public WriteDelegate(object @object, IntPtr method)
810 {
812 this.m_target = @object;
814 this.method_code = this;
815 }
816
817 // Token: 0x0600299C RID: 10652 RVA: 0x0005A770 File Offset: 0x00058970
818 public void Invoke(byte[] buffer, int offset, int count)
819 {
822 IntPtr method = this.method;
823 }
824
825 // Token: 0x0600299D RID: 10653 RVA: 0x0000207A File Offset: 0x0000027A
826 public IAsyncResult BeginInvoke(byte[] buffer, int offset, int count, AsyncCallback callback, object @object)
827 {
828 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
829 }
830
831 // Token: 0x0600299E RID: 10654 RVA: 0x0005A794 File Offset: 0x00058994
832 public void EndInvoke(IAsyncResult result)
833 {
834 }
835 }
836 }
837}
class f__AnonymousType0<< Count > j__TPar
static bool InternalBlockCopy(Array src, int srcOffsetBytes, Array dst, int dstOffsetBytes, int byteCount)
Definition Buffer.cs:13
IntPtr method_code
Definition Delegate.cs:386
IntPtr invoke_impl
Definition Delegate.cs:371
static void SuppressFinalize(object obj)
Definition GC.cs:116
IAsyncResult BeginInvoke(byte[] buffer, int offset, int count, AsyncCallback callback, object @object)
ReadDelegate(object @object, IntPtr method)
int EndInvoke(IAsyncResult result)
int Invoke(byte[] buffer, int offset, int count)
void EndInvoke(IAsyncResult result)
IAsyncResult BeginInvoke(byte[] buffer, int offset, int count, AsyncCallback callback, object @object)
WriteDelegate(object @object, IntPtr method)
void Invoke(byte[] buffer, int offset, int count)
override void Write(byte[] array, int offset, int count)
override long Length
override bool CanRead
void InitBuffer(int size, bool isZeroSize)
FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool isAsync, bool anonymous)
Definition FileStream.cs:64
FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool anonymous, FileOptions options)
Definition FileStream.cs:69
string GetSecureFileName(string filename, bool full)
override bool CanWrite
override Task< int > ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
override void EndWrite(IAsyncResult asyncResult)
override void Flush()
FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)
Definition FileStream.cs:59
override bool CanSeek
static byte[] buf_recycle
override void Finalize()
override void Dispose(bool disposing)
int ReadData(SafeHandle safeHandle, byte[] buf, int offset, int count)
FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)
Definition FileStream.cs:49
int ReadInternal(byte[] dest, int offset, int count)
FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync)
Definition FileStream.cs:54
SafeFileHandle safeHandle
override long Position
override void SetLength(long value)
override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
int ReadSegment(byte[] dest, int dest_offset, int count)
int WriteSegment(byte[] src, int src_offset, int count)
override int Read([In][Out] byte[] array, int offset, int count)
override void WriteByte(byte value)
FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync, bool isConsoleWrapper)
Definition FileStream.cs:21
FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize)
Definition FileStream.cs:16
void Init(SafeFileHandle safeHandle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync, bool isConsoleWrapper)
Definition FileStream.cs:75
override int EndRead(IAsyncResult asyncResult)
override IAsyncResult BeginWrite(byte[] array, int offset, int numBytes, AsyncCallback userCallback, object stateObject)
FileStream(string path, FileMode mode, FileAccess access)
Definition FileStream.cs:39
override long Seek(long offset, SeekOrigin origin)
override Task FlushAsync(CancellationToken cancellationToken)
override int ReadByte()
override IAsyncResult BeginRead(byte[] array, int offset, int numBytes, AsyncCallback userCallback, object stateObject)
void WriteInternal(byte[] src, int offset, int count)
FileStream(string path, FileMode mode)
Definition FileStream.cs:34
static readonly object buf_recycle_lock
string GetSecureFileName(string filename)
FileStream(string path, FileMode mode, FileAccess access, FileShare share)
Definition FileStream.cs:44
static string GetFullPath(string path)
Definition Path.cs:170
static string GetFileName(string path)
Definition Path.cs:142