Skip to content

Instantly share code, notes, and snippets.

@mkrueger
Created June 2, 2015 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkrueger/333aa0c7fbaf08852a1a to your computer and use it in GitHub Desktop.
Save mkrueger/333aa0c7fbaf08852a1a to your computer and use it in GitHub Desktop.
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