From d8bd219933a778106878bf42cc51c98faee82f23 Mon Sep 17 00:00:00 2001 From: jbevain Date: Tue, 25 May 2010 13:51:40 +0000 Subject: [PATCH] 2010-05-25 Jb Evain * MemoryMappedFile.cs: add missing overloads. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mcs@157850 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- .../System.IO.MemoryMappedFiles/ChangeLog | 4 ++ .../MemoryMappedFile.cs | 48 +++++++++++++++------- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/class/System.Core/System.IO.MemoryMappedFiles/ChangeLog b/class/System.Core/System.IO.MemoryMappedFiles/ChangeLog index 54d6d6af92..bdcd7b9501 100644 --- a/class/System.Core/System.IO.MemoryMappedFiles/ChangeLog +++ b/class/System.Core/System.IO.MemoryMappedFiles/ChangeLog @@ -1,5 +1,9 @@ 2010-05-25 Jb Evain + * MemoryMappedFile.cs: add missing overloads. + +2010-05-25 Jb Evain + * MemoryMappedFile.cs: make some helper methods private. 2010-05-25 Jb Evain diff --git a/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs b/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs index 7803178c00..713d92d3b8 100644 --- a/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs +++ b/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs @@ -52,17 +52,6 @@ namespace System.IO.MemoryMappedFiles FileStream stream; bool keepOpen; int unix_fd; - - public static MemoryMappedFile CreateFromFile (FileStream fileStream) - { - if (fileStream == null) - throw new ArgumentNullException ("fileStream"); - - return new MemoryMappedFile () { - stream = fileStream, - fileAccess = MemoryMappedFileAccess.ReadWrite - }; - } public static MemoryMappedFile CreateFromFile (string path) { @@ -235,12 +224,29 @@ namespace System.IO.MemoryMappedFiles return CreateFromFile (mapName, FileMode.OpenOrCreate, mapName, capacity, access); } - /* [MonoTODO] - public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability handleInheritability) { + public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability handleInheritability) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static MemoryMappedFile OpenExisting (string mapName) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights, HandleInheritability inheritability) + { throw new NotImplementedException (); } - */ public MemoryMappedViewStream CreateViewStream () { @@ -297,7 +303,19 @@ namespace System.IO.MemoryMappedFiles stream = null; } } - + + [MonoTODO] + public MemoryMappedFileSecurity GetAccessControl () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public void SetAccessControl (MemoryMappedFileSecurity memoryMappedFileSecurity) + { + throw new NotImplementedException (); + } + [MonoTODO] public SafeMemoryMappedFileHandle SafeMemoryMappedFileHandle { get { -- 2.11.4.GIT