Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Net.Http.HttpContent.LimitMemoryStream Class Referencesealed

Public Member Functions

 LimitMemoryStream (int maxSize, int capacity)
 
byte[] GetSizedBuffer ()
 
override void Write (byte[] buffer, int offset, int count)
 
override void WriteByte (byte value)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken)
 
override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 
override void EndWrite (IAsyncResult asyncResult)
 
override Task CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
void Dispose ()
 
override void Flush ()
 
override Task FlushAsync (CancellationToken cancellationToken)
 
Task FlushAsync ()
 
virtual byte[] GetBuffer ()
 
virtual bool TryGetBuffer (out ArraySegment< byte > buffer)
 
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))
 
Task< int > ReadAsync (byte[] buffer, int offset, int count)
 
override int ReadByte ()
 
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 long Seek (long offset, SeekOrigin loc)
 
override void SetLength (long value)
 
virtual byte[] ToArray ()
 
override void Write (ReadOnlySpan< byte > buffer)
 
Task WriteAsync (byte[] buffer, int offset, int count)
 
virtual void WriteTo (Stream stream)
 
virtual void Close ()
 
virtual ValueTask DisposeAsync ()
 
virtual IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
virtual int EndRead (IAsyncResult asyncResult)
 
virtual IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
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

byte[] InternalGetBuffer ()
 
int InternalGetPosition ()
 
ReadOnlySpan< byte > InternalReadSpan (int count)
 
int InternalEmulateRead (int count)
 
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]
 
virtual int Capacity [get, set]
 
override long Length [get]
 
override long Position [get, set]
 
virtual bool CanTimeout [get]
 
virtual int ReadTimeout [get, set]
 
virtual int WriteTimeout [get, set]
 

Private Member Functions

void CheckSize (int countToAdd)
 
void EnsureNotClosed ()
 
void EnsureWriteable ()
 
bool EnsureCapacity (int value)
 
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 int _maxSize
 
byte[] _buffer
 
readonly int _origin
 
int _position
 
int _length
 
int _capacity
 
bool _expandable
 
bool _writable
 
readonly bool _exposable
 
bool _isOpen
 
Task< int > _lastReadTask
 

Detailed Description

Definition at line 14 of file HttpContent.cs.


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