83 references to MemoryMappedFileAccess
illink (2)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
175using (var mmf = MemoryMappedFile.CreateFromFile(fileStream, "xmlMap", 0, MemoryMappedFileAccess.Read, HandleInheritability.None, leaveOpen: true))
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
267Using mmf = MemoryMappedFile.CreateFromFile(fileStream, "xmlMap", 0, MemoryMappedFileAccess.Read, HandleInheritability.None, leaveOpen:=True)
Microsoft.CodeAnalysis.Workspaces (4)
TemporaryStorage\TemporaryStorageService.MemoryMappedInfo.cs (4)
82static info => info.MemoryMappedFile.CreateViewAccessor(info.Offset, info.Size, MemoryMappedFileAccess.Read), 99static info => info.MemoryMappedFile.CreateViewStream(info.Offset, info.Size, MemoryMappedFileAccess.Write), 108/// <para><see cref="MemoryMappedFile.CreateViewAccessor(long, long, MemoryMappedFileAccess)"/> and <see 109/// cref="MemoryMappedFile.CreateViewStream(long, long, MemoryMappedFileAccess)"/> will use a native memory map,
netstandard (1)
netstandard.cs (1)
941[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.MemoryMappedFiles.MemoryMappedFileAccess))]
System.Core (1)
System.Core.cs (1)
100[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.MemoryMappedFiles.MemoryMappedFileAccess))]
System.IO.MemoryMappedFiles (65)
Microsoft\Win32\SafeMemoryMappedFileHandle.Unix.cs (2)
23internal readonly MemoryMappedFileAccess _access; 40MemoryMappedFileAccess access, MemoryMappedFileOptions options,
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (44)
89return CreateFromFile(path, FileMode.Open, null, DefaultSize, MemoryMappedFileAccess.ReadWrite); 93return CreateFromFile(path, mode, null, DefaultSize, MemoryMappedFileAccess.ReadWrite); 98return CreateFromFile(path, mode, mapName, DefaultSize, MemoryMappedFileAccess.ReadWrite); 103return CreateFromFile(path, mode, mapName, capacity, MemoryMappedFileAccess.ReadWrite); 107MemoryMappedFileAccess access) 183/// <para>This parameter can't be set to <see cref="MemoryMappedFileAccess.Write"/></para></param> 194/// <para><paramref name="access"/> is set to <see cref="MemoryMappedFileAccess.Write"/>, which is not allowed.</para> 196/// <para><paramref name="access"/> is set to <see cref="MemoryMappedFileAccess.Read"/> and <paramref name="capacity"/> is larger than the length of the file.</para> 204/// <para><paramref name="access"/> is not a valid <see cref="MemoryMappedFileAccess"/> enumeration value.</para> 209MemoryMappedFileAccess access, 238MemoryMappedFileAccess access, 274return CreateNew(mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.None, 278public static MemoryMappedFile CreateNew(string? mapName, long capacity, MemoryMappedFileAccess access) 284public static MemoryMappedFile CreateNew(string? mapName, long capacity, MemoryMappedFileAccess access, 300if (access < MemoryMappedFileAccess.ReadWrite || 301access > MemoryMappedFileAccess.ReadWriteExecute) 306if (access == MemoryMappedFileAccess.Write) 332return CreateOrOpen(mapName, capacity, MemoryMappedFileAccess.ReadWrite, 338MemoryMappedFileAccess access) 345MemoryMappedFileAccess access, MemoryMappedFileOptions options, 357if (access < MemoryMappedFileAccess.ReadWrite || 358access > MemoryMappedFileAccess.ReadWriteExecute) 375if (access == MemoryMappedFileAccess.Write) 389return CreateViewStream(0, DefaultSize, MemoryMappedFileAccess.ReadWrite); 394return CreateViewStream(offset, size, MemoryMappedFileAccess.ReadWrite); 397public MemoryMappedViewStream CreateViewStream(long offset, long size, MemoryMappedFileAccess access) 406if (access < MemoryMappedFileAccess.ReadWrite || access > MemoryMappedFileAccess.ReadWriteExecute) 423return CreateViewAccessor(0, DefaultSize, MemoryMappedFileAccess.ReadWrite); 428return CreateViewAccessor(offset, size, MemoryMappedFileAccess.ReadWrite); 431public MemoryMappedViewAccessor CreateViewAccessor(long offset, long size, MemoryMappedFileAccess access) 440if (access < MemoryMappedFileAccess.ReadWrite || access > MemoryMappedFileAccess.ReadWriteExecute) 486internal static FileAccess GetFileAccess(MemoryMappedFileAccess access) 490case MemoryMappedFileAccess.Read: 491case MemoryMappedFileAccess.ReadExecute: 494case MemoryMappedFileAccess.ReadWrite: 495case MemoryMappedFileAccess.CopyOnWrite: 496case MemoryMappedFileAccess.ReadWriteExecute: 500Debug.Assert(access == MemoryMappedFileAccess.Write); 515private static void ValidateCreateFile(string? mapName, long capacity, MemoryMappedFileAccess access) 527if (access < MemoryMappedFileAccess.ReadWrite || 528access > MemoryMappedFileAccess.ReadWriteExecute) 533if (access == MemoryMappedFileAccess.Write)
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (6)
13private static void VerifyMemoryMappedFileAccess(MemoryMappedFileAccess access, long capacity, SafeFileHandle? fileHandle, long fileSize, out bool isRegularFile) 20if (access == MemoryMappedFileAccess.Read && capacity > fileSize) 31if (access == MemoryMappedFileAccess.Write) 51HandleInheritability inheritability, MemoryMappedFileAccess access, 117HandleInheritability inheritability, MemoryMappedFileAccess access, 132string mapName, HandleInheritability inheritability, MemoryMappedFileAccess access, bool createOrOpen)
System\IO\MemoryMappedFiles\MemoryMappedView.cs (3)
14private readonly MemoryMappedFileAccess _access; 16private MemoryMappedView(SafeMemoryMappedViewHandle viewHandle, long pointerOffset, long size, MemoryMappedFileAccess access) 41public MemoryMappedFileAccess Access
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (10)
12SafeMemoryMappedFileHandle memMappedFileHandle, MemoryMappedFileAccess access, 46(memMappedFileHandle._access == MemoryMappedFileAccess.CopyOnWrite || access == MemoryMappedFileAccess.CopyOnWrite) ? 176MemoryMappedFileAccess access, bool forVerification) 181case MemoryMappedFileAccess.Read: 184case MemoryMappedFileAccess.Write: 187case MemoryMappedFileAccess.ReadWrite: 192case MemoryMappedFileAccess.ReadExecute: 197case MemoryMappedFileAccess.ReadWriteExecute: 203case MemoryMappedFileAccess.CopyOnWrite:
System.Reflection.Metadata (4)
System\Reflection\Internal\MemoryBlocks\StreamMemoryBlockProvider.cs (2)
142access: MemoryMappedFileAccess.Read, 168accessor = _lazyMemoryMap.CreateViewAccessor(start, size, MemoryMappedFileAccess.Read);
System\Reflection\Metadata\MetadataReader.netstandard.cs (2)
81fileStream, null, fileStream.Length, MemoryMappedFileAccess.Read, HandleInheritability.None, true); 82accessor = mappedFile.CreateViewAccessor(0, 0, MemoryMappedFileAccess.Read);
System.Security.Cryptography (2)
src\libraries\Common\src\System\IO\MemoryMappedFiles\MemoryMappedFileMemoryManager.cs (2)
38MemoryMappedFileAccess access = MemoryMappedFileAccess.Read,
System.ServiceModel.NetNamedPipe (2)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (2)
330return _fileMapping.CreateViewStream(0, sizeof(SharedMemoryContents), writable ? MemoryMappedFileAccess.Write : MemoryMappedFileAccess.Read);