PipeWriter
Defines a class that provides a pipeline to which data can be written.
Gets a value that indicates whether the current PipeWriter supports reporting the count of unflushed bytes.
When overridden in a derived class, gets the count of unflushed bytes within the current writer.
protected PipeWriter()
Initializes a new instance of the class.
Creates a PipeWriter wrapping the specified Stream.
Notifies the PipeWriter that bytes bytes were written to the output Span<T> or Memory<T>. You must call GetSpan or GetMemory again and use the returned buffer to continue writing more data after calling Advance; you cannot write to a previously acquired buffer.
Returns a Stream representation of the PipeWriter.
Cancels the pending FlushAsync or WriteAsync operation without causing the operation to throw and without completing the PipeWriter. If there is no pending operation, this cancels the next operation.
Marks the PipeWriter as being complete, meaning no more items will be written to it.
Marks the current pipe writer instance as being complete, meaning no more data will be written to it.
Makes bytes written available to PipeReader and runs ReadAsync continuation.
Returns a Memory<T> to write to that is at least the requested size, as specified by the sizeHint parameter.
Returns a Span<T> to write to that is at least the requested size, as specified by the sizeHint parameter.
Registers a callback that executes when the PipeReader side of the pipe is completed.
public virtual ValueTask<FlushResult> WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default)
Writes the specified byte memory range to the pipe and makes data accessible to the PipeReader.