Created
June 2, 2015 16:43
-
-
Save mkrueger/333aa0c7fbaf08852a1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs | |
index 783aa91..4a2bd99 100644 | |
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs | |
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs | |
@@ -37,10 +37,37 @@ namespace System.IO.MemoryMappedFiles | |
public sealed class MemoryMappedViewAccessor : UnmanagedMemoryAccessor, IDisposable { | |
IntPtr mmap_handle; | |
SafeMemoryMappedViewHandle safe_handle; | |
+ | |
+ MSShouldNotUseInternalAPIWrapper m_view; | |
+ | |
+ public long PointerOffset | |
+ { | |
+ get { | |
+ return 0; | |
+ } | |
+ } | |
+ | |
+ class MSShouldNotUseInternalAPIWrapper | |
+ { | |
+ MemoryMappedViewAccessor parent; | |
+ | |
+ long PointerOffset { | |
+ get { | |
+ return parent.PointerOffset; | |
+ } | |
+ } | |
+ | |
+ public MSShouldNotUseInternalAPIWrapper(MemoryMappedViewAccessor parent) | |
+ { | |
+ this.parent = parent; | |
+ } | |
+ } | |
+ | |
internal MemoryMappedViewAccessor (IntPtr handle, long offset, long size, MemoryMappedFileAccess access) | |
{ | |
Create (handle, offset, size, access); | |
+ m_view = new MSShouldNotUseInternalAPIWrapper(this); | |
} | |
static FileAccess ToFileAccess (MemoryMappedFileAccess access) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment