Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MemoryMappedViewStream.cs
Go to the documentation of this file.
2
4
6{
7 private readonly MemoryMappedView _view;
8
10
12
18
19 public override void SetLength(long value)
20 {
21 if (value < 0)
22 {
24 }
26 }
27
28 protected override void Dispose(bool disposing)
29 {
30 try
31 {
32 if (disposing && !_view.IsClosed)
33 {
34 Flush();
35 }
36 }
37 finally
38 {
39 try
40 {
41 _view.Dispose();
42 }
43 finally
44 {
45 base.Dispose(disposing);
46 }
47 }
48 }
49
50 public override void Flush()
51 {
52 if (!CanSeek)
53 {
55 }
56 _view.Flush((UIntPtr)(ulong)base.Capacity);
57 }
58}
static FileAccess GetFileAccess(MemoryMappedFileAccess access)
unsafe void Initialize(SafeBuffer buffer, long offset, long length, FileAccess access)
static string ObjectDisposed_StreamIsClosed
Definition SR.cs:72
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
static string NotSupported_MMViewStreamsFixedLength
Definition SR.cs:68
Definition SR.cs:7