PipeWriter Clase

Definición

Define una clase que proporciona una canalización en la que se pueden escribir datos.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)
Herencia
PipeWriter
Implementaciones

Constructores

PipeWriter()

Inicializa una nueva instancia de la clase.Initializes a new instance of the class.

Métodos

Advance(Int32)

Notifica a PipeWriter que se han escrito bytes bytes en el objeto Span<T> o Memory<T> de salida.Notifies the PipeWriter that bytes bytes were written to the output Span<T> or Memory<T>. Debe solicitar un nuevo búfer después de llamar a Advance(Int32) para seguir escribiendo más datos; no puede escribir en un búfer que se haya obtenido anteriormente.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)

Devuelve una representación de Stream de la clase PipeWriter.Returns a Stream representation of the PipeWriter.

CancelPendingFlush()

Cancela la operación pendiente de FlushAsync(CancellationToken) o WriteAsync(ReadOnlyMemory<Byte>, CancellationToken) sin provocar que se inicie dicha operación y sin completar la clase PipeWriter.Cancels the pending FlushAsync(CancellationToken) or WriteAsync(ReadOnlyMemory<Byte>, CancellationToken) operation without causing the operation to throw and without completing the PipeWriter. Si no hay ninguna operación pendiente, se cancela la siguiente operación.If there is no pending operation, this cancels the next operation.

Complete(Exception)

Marca PipeWriter como completo, lo que significa que ya no se escribirán más elementos en él.Marks the PipeWriter as being complete, meaning no more items will be written to it.

CompleteAsync(Exception)

Marca la instancia actual del escritor de la canalización como completada, lo que significa que no se escribirán más datos en ella.Marks the current pipe writer instance as being complete, meaning no more data will be written to it.

CopyFromAsync(Stream, CancellationToken)

Lee de forma asincrónica los bytes de la secuencia especificada y los escribe en PipeWriter.Asynchronously reads the bytes from the specified stream and writes them to the PipeWriter.

Create(Stream, StreamPipeWriterOptions)

Crea un objeto PipeWriter que encapsula el objeto Stream especificado.Creates a PipeWriter wrapping the specified Stream.

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.Determines whether the specified object is equal to the current object.

(Heredado de Object)
FlushAsync(CancellationToken)

Hace que los bytes escritos estén disponibles para PipeReader y ejecuta la continuación ReadAsync(CancellationToken).Makes bytes written available to PipeReader and runs ReadAsync(CancellationToken) continuation.

GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Heredado de Object)
GetMemory(Int32)

Devuelve un objeto Memory<T> en el que escribir, que tiene al menos el tamaño solicitado, en función de lo especificado por el parámetro sizeHint.Returns a Memory<T> to write to that is at least the requested size, as specified by the sizeHint parameter.

GetSpan(Int32)

Devuelve un objeto Span<T> en el que escribir, que tiene al menos el tamaño solicitado, en función de lo especificado por el parámetro sizeHint.Returns a Span<T> to write to that is at least the requested size, as specified by the sizeHint parameter.

GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Heredado de Object)
MemberwiseClone()

Crea una copia superficial del Object actual.Creates a shallow copy of the current Object.

(Heredado de Object)
OnReaderCompleted(Action<Exception,Object>, Object)
Obsoleto.

Registra una devolución de llamada que se ejecuta cuando se completa el lado PipeReader de la canalización.Registers a callback that executes when the PipeReader side of the pipe is completed.

ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Heredado de Object)
WriteAsync(ReadOnlyMemory<Byte>, CancellationToken)

Escribe el intervalo de memoria de bytes especificado en la canalización y hace que los datos estén accesibles para PipeReader.Writes the specified byte memory range to the pipe and makes data accessible to the PipeReader.

Se aplica a