Merge pull request #1857 from slluis/fix-assembly-resolver
[mono.git] / mcs / class / System.Core / System.IO.MemoryMappedFiles / MemoryMappedViewStream.cs
index 651e2d0d262449e04229a281fd4bd3ff86ba26ef..6fbaca605f900dd66241e5ed1a6cdbbad3d3f933 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0
 
 using System;
 using System.IO;
@@ -37,12 +36,19 @@ namespace System.IO.MemoryMappedFiles
        public sealed class MemoryMappedViewStream : UnmanagedMemoryStream {
                IntPtr mmap_handle;
                object monitor;
-               
+               long pointerOffset;
+
                internal MemoryMappedViewStream (IntPtr handle, long offset, long size, MemoryMappedFileAccess access) {
+                       pointerOffset = offset;
                        monitor = new Object ();
                        CreateStream (handle, offset, size, access);
                }
 
+               public long PointerOffset
+               {
+                       get { return pointerOffset; }
+               }
+
                public SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle { 
                        get {
                                throw new NotImplementedException ();
@@ -90,4 +96,3 @@ namespace System.IO.MemoryMappedFiles
        }
 }
 
-#endif