184 if (asyncResult !=
null)
187 if (activeReadWriteTask !=
null)
254 if (
count != 0 || !
true)
323 if (asyncResult ==
null)
519 if (callback !=
null)
525 while (callback !=
null)
540 if (callback !=
null)
546 while (callback !=
null)
633 base.AddCompletionAction(
this);
792 while (asyncResult ==
null)
807 while (asyncResult ==
null)
1006 if (exceptionInfo !=
null)
1016 return "IAsyncResult object did not come from the corresponding async method on this type.";
1022 if (asyncResult !=
null)
class f__AnonymousType0<< Count > j__TPar
static void SuppressFinalize(object obj)
static void ValidateCopyToArgs(Stream source, Stream destination, int bufferSize)
override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
override void Write(ReadOnlySpan< byte > buffer)
override Task FlushAsync(CancellationToken cancellationToken)
override long Seek(long offset, SeekOrigin origin)
override void Dispose(bool disposing)
override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
override int Read(Span< byte > buffer)
override ValueTask WriteAsync(ReadOnlyMemory< byte > buffer, [Optional] CancellationToken cancellationToken)
override void CopyTo(Stream destination, int bufferSize)
override void EndWrite(IAsyncResult asyncResult)
override void WriteByte(byte value)
override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
override void SetLength(long length)
static readonly Task< int > s_zeroTask
override ValueTask< int > ReadAsync(Memory< byte > buffer, [Optional] CancellationToken cancellationToken)
override void Write(byte[] buffer, int offset, int count)
override int EndRead(IAsyncResult asyncResult)
override int Read(byte[] buffer, int offset, int count)
override Task< int > ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
static void InvokeAsyncCallback(object completedTask)
ReadWriteTask(bool isRead, bool apm, Func< object, int > function, object state, Stream stream, byte[] buffer, int offset, int count, AsyncCallback callback)
ExecutionContext _context
static ContextCallback s_invokeAsyncCallback
ManualResetEvent _waitHandle
WaitHandle AsyncWaitHandle
bool CompletedSynchronously
SynchronousAsyncResult(object asyncStateObject)
SynchronousAsyncResult(int bytesRead, object asyncStateObject)
readonly object _stateObject
static void EndWrite(IAsyncResult asyncResult)
static int EndRead(IAsyncResult asyncResult)
SynchronousAsyncResult(Exception ex, object asyncStateObject, bool isWrite)
ExceptionDispatchInfo _exceptionInfo
IAsyncResult BeginReadInternal(byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
virtual void Dispose(bool disposing)
static ValueTask< int >< ReadAsync > g__FinishReadAsync(Task< int > readTask, byte[] localBuffer, Memory< byte > localDestination)
virtual ValueTask< int > ReadAsync(Memory< byte > buffer, [Optional] CancellationToken cancellationToken)
bool HasOverriddenBeginEndRead()
IAsyncResult BlockingBeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
Task BeginEndWriteAsync(byte[] buffer, int offset, int count)
void SetLength(long value)
bool HasOverriddenBeginEndWrite()
virtual void Write(ReadOnlySpan< byte > buffer)
long Seek(long offset, SeekOrigin origin)
virtual Task FlushAsync(CancellationToken cancellationToken)
void RunReadWriteTask(Stream.ReadWriteTask readWriteTask)
IAsyncResult BeginWriteInternal(byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
Task FinishWriteAsync(Task writeTask, byte[] localBuffer)
Task WriteAsync(byte[] buffer, int offset, int count)
virtual void EndWrite(IAsyncResult asyncResult)
virtual ValueTask WriteAsync(ReadOnlyMemory< byte > buffer, [Optional] CancellationToken cancellationToken)
int Read(byte[] buffer, int offset, int count)
virtual int Read(Span< byte > buffer)
void FinishTrackingAsyncOperation()
IAsyncResult BlockingBeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
virtual void CopyTo(Stream destination, int bufferSize)
void CopyTo(Stream destination)
virtual Task< int > ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Task< int > ReadAsync(byte[] buffer, int offset, int count)
SemaphoreSlim _asyncActiveSemaphore
static void BlockingEndWrite(IAsyncResult asyncResult)
void Write(byte[] buffer, int offset, int count)
virtual IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
virtual void WriteByte(byte value)
void RunReadWriteTaskWhenReady(Task asyncWaiter, Stream.ReadWriteTask readWriteTask)
virtual IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
Task< int > BeginEndReadAsync(byte[] buffer, int offset, int count)
virtual int EndRead(IAsyncResult asyncResult)
static readonly Stream Null
SemaphoreSlim EnsureAsyncActiveSemaphoreInitialized()
Stream.ReadWriteTask _activeReadWriteTask
virtual Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
static int BlockingEndRead(IAsyncResult asyncResult)
static ExceptionDispatchInfo Capture(Exception source)
static ExecutionContext Capture()
static void ThrowArgumentNullException(ExceptionArgument argument)
void Invoke(Task completingTask)
void SetStateMachine(IAsyncStateMachine stateMachine)
ConfiguredTaskAwaitable.ConfiguredTaskAwaiter u__1
AsyncTaskMethodBuilder t__builder
AsyncValueTaskMethodBuilder< int ><> t__builder
ConfiguredTaskAwaitable< int >.ConfiguredTaskAwaiter u__1
void SetStateMachine(IAsyncStateMachine stateMachine)
Memory< byte > localDestination
static AsyncTaskMethodBuilder< TResult > Create()
static AsyncValueTaskMethodBuilder< TResult > Create()
static CancellationToken None