Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.IO.UnmanagedMemoryStream Class Reference

Public Member Functions

 UnmanagedMemoryStream (SafeBuffer buffer, long offset, long length)
 
 UnmanagedMemoryStream (SafeBuffer buffer, long offset, long length, FileAccess access)
 
unsafe UnmanagedMemoryStream (byte *pointer, long length)
 
unsafe UnmanagedMemoryStream (byte *pointer, long length, long capacity, FileAccess access)
 
override void Flush ()
 
override Task FlushAsync (CancellationToken cancellationToken)
 
override int Read (byte[] buffer, int offset, int count)
 
override int Read (Span< byte > buffer)
 
override Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask< int > ReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
unsafe override int ReadByte ()
 
override long Seek (long offset, SeekOrigin loc)
 
unsafe override void SetLength (long value)
 
override void Write (byte[] buffer, int offset, int count)
 
override void Write (ReadOnlySpan< byte > buffer)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
unsafe override void WriteByte (byte value)
 
void CopyTo (Stream destination)
 
virtual void CopyTo (Stream destination, int bufferSize)
 
Task CopyToAsync (Stream destination)
 
Task CopyToAsync (Stream destination, int bufferSize)
 
Task CopyToAsync (Stream destination, CancellationToken cancellationToken)
 
virtual Task CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
void Dispose ()
 
virtual void Close ()
 
virtual ValueTask DisposeAsync ()
 
Task FlushAsync ()
 
virtual IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
virtual int EndRead (IAsyncResult asyncResult)
 
Task< int > ReadAsync (byte[] buffer, int offset, int count)
 
virtual IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
virtual void EndWrite (IAsyncResult asyncResult)
 
Task WriteAsync (byte[] buffer, int offset, int count)
 
object GetLifetimeService ()
 
virtual object InitializeLifetimeService ()
 

Static Public Member Functions

static Stream Synchronized (Stream stream)
 

Static Public Attributes

static readonly Stream Null = new NullStream()
 

Protected Member Functions

 UnmanagedMemoryStream ()
 
unsafe void Initialize (SafeBuffer buffer, long offset, long length, FileAccess access)
 
unsafe void Initialize (byte *pointer, long length, long capacity, FileAccess access)
 
unsafe override void Dispose (bool disposing)
 
SemaphoreSlim EnsureAsyncActiveSemaphoreInitialized ()
 
virtual WaitHandle CreateWaitHandle ()
 
virtual void ObjectInvariant ()
 
MarshalByRefObject MemberwiseClone (bool cloneIdentity)
 

Static Protected Member Functions

static void ValidateBufferArguments (byte[] buffer, int offset, int count)
 
static void ValidateCopyToArguments (Stream destination, int bufferSize)
 

Protected Attributes

SemaphoreSlim _asyncActiveSemaphore
 

Package Functions

unsafe int ReadCore (Span< byte > buffer)
 
unsafe void WriteCore (ReadOnlySpan< byte > buffer)
 
Task< int > BeginReadInternal (byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
 
Task BeginWriteInternal (byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
 

Properties

override bool CanRead [get]
 
override bool CanSeek [get]
 
override bool CanWrite [get]
 
override long Length [get]
 
long Capacity [get]
 
override long Position [get, set]
 
unsafe byte * PositionPointer [get, set]
 
virtual bool CanTimeout [get]
 
virtual int ReadTimeout [get, set]
 
virtual int WriteTimeout [get, set]
 

Private Member Functions

void EnsureNotClosed ()
 
void EnsureReadable ()
 
void EnsureWriteable ()
 
bool HasOverriddenBeginEndRead ()
 
bool HasOverriddenBeginEndWrite ()
 
int GetCopyBufferSize ()
 
Task< int > BeginEndReadAsync (byte[] buffer, int offset, int count)
 
void FinishTrackingAsyncOperation (ReadWriteTask task)
 
Task BeginEndWriteAsync (byte[] buffer, int offset, int count)
 

Static Private Member Functions

static void RunReadWriteTaskWhenReady (Task asyncWaiter, ReadWriteTask readWriteTask)
 
static void RunReadWriteTask (ReadWriteTask readWriteTask)
 
static async Task FinishWriteAsync (Task writeTask, byte[] localBuffer)
 

Private Attributes

SafeBuffer _buffer
 
unsafe byte * _mem
 
long _length
 
long _capacity
 
long _position
 
long _offset
 
FileAccess _access
 
bool _isOpen
 
Task< int > _lastReadTask
 

Detailed Description

Definition at line 7 of file UnmanagedMemoryStream.cs.


The documentation for this class was generated from the following file: