Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.IO.Strategies.AsyncWindowsFileStreamStrategy Class Referencesealed

Public Member Functions

override Task CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
override ValueTask DisposeAsync ()
 
void Dispose ()
 
override void Flush ()
 
override Task FlushAsync (CancellationToken cancellationToken)
 
Task FlushAsync ()
 
override long Seek (long offset, SeekOrigin origin)
 
override void SetLength (long value)
 
unsafe override int ReadByte ()
 
override int Read (byte[] buffer, int offset, int count)
 
override int Read (Span< byte > buffer)
 
unsafe override void WriteByte (byte value)
 
override void Write (byte[] buffer, int offset, int count)
 
override void Write (ReadOnlySpan< byte > buffer)
 
override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 
virtual IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
override void EndWrite (IAsyncResult asyncResult)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > source, CancellationToken cancellationToken)
 
Task WriteAsync (byte[] buffer, int offset, int count)
 
override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 
virtual IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
override int EndRead (IAsyncResult asyncResult)
 
override Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask< int > ReadAsync (Memory< byte > destination, CancellationToken cancellationToken)
 
Task< int > ReadAsync (byte[] buffer, int offset, int count)
 
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 void Close ()
 
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

override void Dispose (bool disposing)
 
void SetLengthCore (long value)
 
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

readonly SafeFileHandle _fileHandle
 
long _filePosition
 
SemaphoreSlim _asyncActiveSemaphore
 

Package Functions

 AsyncWindowsFileStreamStrategy (SafeFileHandle handle, FileAccess access)
 
 AsyncWindowsFileStreamStrategy (string path, FileMode mode, FileAccess access, FileShare share, FileOptions options, long preallocationSize)
 
void OnIncompleteOperation (int expectedBytesTransferred, int actualBytesTransferred)
 
override void DisposeInternal (bool disposing)
 
override void Flush (bool flushToDisk)
 
override void Lock (long position, long length)
 
override void Unlock (long position, long length)
 
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 IsAsync [get]
 
override bool CanSeek [get]
 
override bool CanRead [get]
 
override bool CanWrite [get]
 
override long Length [get]
 
bool LengthCachingSupported [get]
 
override long Position [get, set]
 
override string Name [get]
 
override bool IsClosed [get]
 
override SafeFileHandle SafeFileHandle [get]
 
IntPtr Handle [get]
 
virtual bool CanTimeout [get]
 
virtual int ReadTimeout [get, set]
 
virtual int WriteTimeout [get, set]
 

Private Member Functions

async Task AsyncModeCopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
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

readonly FileAccess _access
 
long _length = -1L
 
long _appendStart
 
bool _lengthCanBeCached
 

Detailed Description

Definition at line 7 of file AsyncWindowsFileStreamStrategy.cs.


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