Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Net.WebFileStream Class Referencesealed

Public Member Functions

 WebFileStream (FileWebRequest request, string path, FileMode mode, FileAccess access, FileShare sharing)
 
 WebFileStream (FileWebRequest request, string path, FileMode mode, FileAccess access, FileShare sharing, int length, bool async)
 
override int Read (byte[] buffer, int offset, int size)
 
override void Write (byte[] buffer, int offset, int size)
 
override IAsyncResult BeginRead (byte[] buffer, int offset, int size, AsyncCallback callback, object state)
 
override int EndRead (IAsyncResult ar)
 
override IAsyncResult BeginWrite (byte[] buffer, int offset, int size, AsyncCallback callback, object state)
 
override void EndWrite (IAsyncResult ar)
 
override Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override Task CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
virtual void Lock (long position, long length)
 
virtual void Unlock (long position, long length)
 
override Task FlushAsync (CancellationToken cancellationToken)
 
Task FlushAsync ()
 
override int Read (Span< byte > buffer)
 
override ValueTask< int > ReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
Task< int > ReadAsync (byte[] buffer, int offset, int count)
 
override void Write (ReadOnlySpan< byte > buffer)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
Task WriteAsync (byte[] buffer, int offset, int count)
 
override void Flush ()
 
virtual void Flush (bool flushToDisk)
 
override void SetLength (long value)
 
override int ReadByte ()
 
override void WriteByte (byte value)
 
void Dispose ()
 
override ValueTask DisposeAsync ()
 
override void CopyTo (Stream destination, int bufferSize)
 
void CopyTo (Stream destination)
 
Task CopyToAsync (Stream destination)
 
Task CopyToAsync (Stream destination, int bufferSize)
 
Task CopyToAsync (Stream destination, CancellationToken cancellationToken)
 
override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
override long Seek (long offset, SeekOrigin origin)
 
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)
 
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

void Abort ()
 
void DisposeInternal (bool disposing)
 
Task BaseFlushAsync (CancellationToken cancellationToken)
 
int BaseRead (Span< byte > buffer)
 
Task< int > BaseReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
ValueTask< int > BaseReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
void BaseWrite (ReadOnlySpan< byte > buffer)
 
Task BaseWriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
ValueTask BaseWriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
ValueTask BaseDisposeAsync ()
 
Task BaseCopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
IAsyncResult BaseBeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 
int BaseEndRead (IAsyncResult asyncResult)
 
IAsyncResult BaseBeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 
void BaseEndWrite (IAsyncResult asyncResult)
 
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

virtual IntPtr Handle [get]
 
override bool CanRead [get]
 
override bool CanWrite [get]
 
virtual SafeFileHandle SafeFileHandle [get]
 
virtual string Name [get]
 
virtual bool IsAsync [get]
 
override long Length [get]
 
override long Position [get, set]
 
override bool CanSeek [get]
 
virtual bool CanTimeout [get]
 
virtual int ReadTimeout [get, set]
 
virtual int WriteTimeout [get, set]
 

Private Member Functions

void CheckAborted ()
 
void ValidateReadWriteArgs (byte[] buffer, int offset, int count)
 
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 ValidateHandle (SafeFileHandle handle, FileAccess access, int bufferSize)
 
static void ValidateHandle (SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync)
 
static void RunReadWriteTaskWhenReady (Task asyncWaiter, ReadWriteTask readWriteTask)
 
static void RunReadWriteTask (ReadWriteTask readWriteTask)
 
static async Task FinishWriteAsync (Task writeTask, byte[] localBuffer)
 

Private Attributes

readonly FileWebRequest _request
 
readonly FileStreamStrategy _strategy
 

Detailed Description

Definition at line 7 of file WebFileStream.cs.


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