164 if (access < FileAccess.Read || access >
FileAccess.ReadWrite)
196 [CLSCompliant(
false)]
202 [CLSCompliant(
false)]
208 [CLSCompliant(
false)]
227 if (access < FileAccess.Read || access >
FileAccess.ReadWrite)
243 protected unsafe
override void Dispose(
bool disposing)
247 base.Dispose(disposing);
322 int num4 = (int)num3;
362 return (lastReadTask !=
null && lastReadTask.
Result == num) ? lastReadTask : (
_lastReadTask =
Task.FromResult(num));
508 long num3 = num +
buffer.Length;
584 Write(segment.Array, segment.Offset, segment.Count);
static unsafe void ZeroMemory(byte *dest, nuint len)
static void Memmove(ref byte dest, ref byte src, nuint len)
static void ValidateBufferArguments(byte[] buffer, int offset, int count)
unsafe void WriteCore(ReadOnlySpan< byte > buffer)
override void Write(ReadOnlySpan< byte > buffer)
unsafe override void WriteByte(byte value)
unsafe byte * PositionPointer
unsafe override int ReadByte()
unsafe void Initialize(byte *pointer, long length, long capacity, FileAccess access)
unsafe UnmanagedMemoryStream(byte *pointer, long length)
unsafe void Initialize(SafeBuffer buffer, long offset, long length, FileAccess access)
override ValueTask< int > ReadAsync(Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length)
unsafe int ReadCore(Span< byte > buffer)
override long Seek(long offset, SeekOrigin loc)
override int Read(byte[] buffer, int offset, int count)
UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length, FileAccess access)
override int Read(Span< byte > buffer)
override void Write(byte[] buffer, int offset, int count)
unsafe override void SetLength(long value)
override Task< int > ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
override Task FlushAsync(CancellationToken cancellationToken)
unsafe override void Dispose(bool disposing)
unsafe UnmanagedMemoryStream(byte *pointer, long length, long capacity, FileAccess access)
override ValueTask WriteAsync(ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
Task< int > _lastReadTask
static byte Min(byte val1, byte val2)
unsafe void AcquirePointer(ref byte *pointer)
static string Arg_BufferTooSmall
static string ArgumentOutOfRange_UnmanagedMemStreamWrapAround
static string IO_SeekBeforeBegin
static string InvalidOperation_CalledTwice
static string ArgumentOutOfRange_Enum
static string ArgumentOutOfRange_LengthGreaterThanCapacity
static string Argument_InvalidSafeBufferOffLen
static string NotSupported_UmsSafeBuffer
static string IO_StreamTooLong
static string ArgumentOutOfRange_UnmanagedMemStreamLength
static string Argument_InvalidSeekOrigin
static string IndexOutOfRange_UMSPosition
static string ArgumentOutOfRange_NeedNonNegNum
static string IO_FixedCapacity
static int Exchange(ref int location1, int value)
static long Read(ref long location)
static Task FromException(Exception exception)
static Task FromCanceled(CancellationToken cancellationToken)
static Task CompletedTask
static void ThrowNotSupportedException_UnwritableStream()
static void ThrowObjectDisposedException_StreamClosed(string objectName)
static void ThrowNotSupportedException_UnreadableStream()
static ValueTask FromCanceled(CancellationToken cancellationToken)
static ValueTask FromException(Exception exception)