83 references to MemoryMappedFileAccess
illink (2)
Linker\AssemblyResolver.cs (2)
160
fileStream, null, fileStream.Length,
MemoryMappedFileAccess
.Read, HandleInheritability.None, true);
161
viewStream = mappedFile.CreateViewStream (0, 0,
MemoryMappedFileAccess
.Read);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
175
using (var mmf = MemoryMappedFile.CreateFromFile(fileStream, "xmlMap", 0,
MemoryMappedFileAccess
.Read, HandleInheritability.None, leaveOpen: true))
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
267
Using mmf = MemoryMappedFile.CreateFromFile(fileStream, "xmlMap", 0,
MemoryMappedFileAccess
.Read, HandleInheritability.None, leaveOpen:=True)
Microsoft.CodeAnalysis.Workspaces (4)
TemporaryStorage\TemporaryStorageService.MemoryMappedInfo.cs (4)
82
static info => info.MemoryMappedFile.CreateViewAccessor(info.Offset, info.Size,
MemoryMappedFileAccess
.Read),
99
static 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)
23
internal readonly
MemoryMappedFileAccess
_access;
40
MemoryMappedFileAccess
access, MemoryMappedFileOptions options,
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (44)
89
return CreateFromFile(path, FileMode.Open, null, DefaultSize,
MemoryMappedFileAccess
.ReadWrite);
93
return CreateFromFile(path, mode, null, DefaultSize,
MemoryMappedFileAccess
.ReadWrite);
98
return CreateFromFile(path, mode, mapName, DefaultSize,
MemoryMappedFileAccess
.ReadWrite);
103
return CreateFromFile(path, mode, mapName, capacity,
MemoryMappedFileAccess
.ReadWrite);
107
MemoryMappedFileAccess
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>
209
MemoryMappedFileAccess
access,
238
MemoryMappedFileAccess
access,
274
return CreateNew(mapName, capacity,
MemoryMappedFileAccess
.ReadWrite, MemoryMappedFileOptions.None,
278
public static MemoryMappedFile CreateNew(string? mapName, long capacity,
MemoryMappedFileAccess
access)
284
public static MemoryMappedFile CreateNew(string? mapName, long capacity,
MemoryMappedFileAccess
access,
300
if (access <
MemoryMappedFileAccess
.ReadWrite ||
301
access >
MemoryMappedFileAccess
.ReadWriteExecute)
306
if (access ==
MemoryMappedFileAccess
.Write)
332
return CreateOrOpen(mapName, capacity,
MemoryMappedFileAccess
.ReadWrite,
338
MemoryMappedFileAccess
access)
345
MemoryMappedFileAccess
access, MemoryMappedFileOptions options,
357
if (access <
MemoryMappedFileAccess
.ReadWrite ||
358
access >
MemoryMappedFileAccess
.ReadWriteExecute)
375
if (access ==
MemoryMappedFileAccess
.Write)
389
return CreateViewStream(0, DefaultSize,
MemoryMappedFileAccess
.ReadWrite);
394
return CreateViewStream(offset, size,
MemoryMappedFileAccess
.ReadWrite);
397
public MemoryMappedViewStream CreateViewStream(long offset, long size,
MemoryMappedFileAccess
access)
406
if (access <
MemoryMappedFileAccess
.ReadWrite || access >
MemoryMappedFileAccess
.ReadWriteExecute)
423
return CreateViewAccessor(0, DefaultSize,
MemoryMappedFileAccess
.ReadWrite);
428
return CreateViewAccessor(offset, size,
MemoryMappedFileAccess
.ReadWrite);
431
public MemoryMappedViewAccessor CreateViewAccessor(long offset, long size,
MemoryMappedFileAccess
access)
440
if (access <
MemoryMappedFileAccess
.ReadWrite || access >
MemoryMappedFileAccess
.ReadWriteExecute)
486
internal static FileAccess GetFileAccess(
MemoryMappedFileAccess
access)
490
case
MemoryMappedFileAccess
.Read:
491
case
MemoryMappedFileAccess
.ReadExecute:
494
case
MemoryMappedFileAccess
.ReadWrite:
495
case
MemoryMappedFileAccess
.CopyOnWrite:
496
case
MemoryMappedFileAccess
.ReadWriteExecute:
500
Debug.Assert(access ==
MemoryMappedFileAccess
.Write);
515
private static void ValidateCreateFile(string? mapName, long capacity,
MemoryMappedFileAccess
access)
527
if (access <
MemoryMappedFileAccess
.ReadWrite ||
528
access >
MemoryMappedFileAccess
.ReadWriteExecute)
533
if (access ==
MemoryMappedFileAccess
.Write)
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (6)
13
private static void VerifyMemoryMappedFileAccess(
MemoryMappedFileAccess
access, long capacity, SafeFileHandle? fileHandle, long fileSize, out bool isRegularFile)
20
if (access ==
MemoryMappedFileAccess
.Read && capacity > fileSize)
31
if (access ==
MemoryMappedFileAccess
.Write)
51
HandleInheritability inheritability,
MemoryMappedFileAccess
access,
117
HandleInheritability inheritability,
MemoryMappedFileAccess
access,
132
string mapName, HandleInheritability inheritability,
MemoryMappedFileAccess
access, bool createOrOpen)
System\IO\MemoryMappedFiles\MemoryMappedView.cs (3)
14
private readonly
MemoryMappedFileAccess
_access;
16
private MemoryMappedView(SafeMemoryMappedViewHandle viewHandle, long pointerOffset, long size,
MemoryMappedFileAccess
access)
41
public
MemoryMappedFileAccess
Access
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (10)
12
SafeMemoryMappedFileHandle memMappedFileHandle,
MemoryMappedFileAccess
access,
46
(memMappedFileHandle._access ==
MemoryMappedFileAccess
.CopyOnWrite || access ==
MemoryMappedFileAccess
.CopyOnWrite) ?
176
MemoryMappedFileAccess
access, bool forVerification)
181
case
MemoryMappedFileAccess
.Read:
184
case
MemoryMappedFileAccess
.Write:
187
case
MemoryMappedFileAccess
.ReadWrite:
192
case
MemoryMappedFileAccess
.ReadExecute:
197
case
MemoryMappedFileAccess
.ReadWriteExecute:
203
case
MemoryMappedFileAccess
.CopyOnWrite:
System.Reflection.Metadata (4)
System\Reflection\Internal\MemoryBlocks\StreamMemoryBlockProvider.cs (2)
142
access:
MemoryMappedFileAccess
.Read,
168
accessor = _lazyMemoryMap.CreateViewAccessor(start, size,
MemoryMappedFileAccess
.Read);
System\Reflection\Metadata\MetadataReader.netstandard.cs (2)
81
fileStream, null, fileStream.Length,
MemoryMappedFileAccess
.Read, HandleInheritability.None, true);
82
accessor = mappedFile.CreateViewAccessor(0, 0,
MemoryMappedFileAccess
.Read);
System.Security.Cryptography (2)
src\libraries\Common\src\System\IO\MemoryMappedFiles\MemoryMappedFileMemoryManager.cs (2)
38
MemoryMappedFileAccess
access =
MemoryMappedFileAccess
.Read,
System.ServiceModel.NetNamedPipe (2)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (2)
330
return _fileMapping.CreateViewStream(0, sizeof(SharedMemoryContents), writable ?
MemoryMappedFileAccess
.Write :
MemoryMappedFileAccess
.Read);