PipeWriter Class

Definition

Defines a class that provides a pipeline to which data can be written.

public ref class PipeWriter abstract : System::Buffers::IBufferWriter<System::Byte>
public abstract class PipeWriter : System.Buffers.IBufferWriter<byte>
type PipeWriter = class
    interface IBufferWriter<byte>
Public MustInherit Class PipeWriter
Implements IBufferWriter(Of Byte)
Inheritance
PipeWriter
Implements

Constructors

PipeWriter()

Initializes a new instance of the class.

Methods

Advance(Int32)

Notifies the PipeWriter that bytes bytes were written to the output Span<T> or Memory<T>. You must request a new buffer after calling Advance(Int32) to continue writing more data; you cannot write to a previously acquired buffer.

AsStream(Boolean)

Returns the underlying Stream wrapped by the PipeWriter.

CancelPendingFlush()

Cancels the pending FlushAsync(CancellationToken) operation. If there is none, cancels next FlushAsync(CancellationToken) operation, without completing the PipeWriter.

Complete(Exception)

Marks the PipeWriter as being complete, meaning no more items will be written to it.

CompleteAsync(Exception)

Marks the current pipe writer instance as being complete, meaning no more data will be written to it.

CopyFromAsync(Stream, CancellationToken)

Asynchronously reads the bytes from the specified stream and writes them to the PipeWriter.

Create(Stream, StreamPipeWriterOptions)

Creates a PipeWriter wrapping the specified Stream.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
FlushAsync(CancellationToken)

Makes bytes written available to PipeReader and runs ReadAsync(CancellationToken) continuation.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetMemory(Int32)

Returns a Memory<T> to write to that is at least the requested size, as specified by the sizeHint parameter.

GetSpan(Int32)

Returns a Span<T> to write to that is at least the requested size, as specified by the sizeHint parameter.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnReaderCompleted(Action<Exception,Object>, Object)

Registers a callback that executes when the PipeReader side of the pipe is completed.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
WriteAsync(ReadOnlyMemory<Byte>, CancellationToken)

Writes the specified byte memory range to the pipe and makes data accessible to the PipeReader.

Applies to