StreamPipeReaderOptions(MemoryPool<Byte>, Int32, Int32, Boolean) Construtor
Definição
Inicializa uma instância de StreamPipeReaderOptions, opcionalmente especificando um pool de memória, um tamanho mínimo do buffer, um tamanho mínimo de leitura e se o fluxo subjacente deve ser deixado aberto após a conclusão de PipeReader.Initializes a StreamPipeReaderOptions instance, optionally specifying a memory pool, a minimum buffer size, a minimum read size, and whether the underlying stream should be left open after the PipeReader completes.
public StreamPipeReaderOptions (System.Buffers.MemoryPool<byte> pool = default, int bufferSize = -1, int minimumReadSize = -1, bool leaveOpen = false);
public StreamPipeReaderOptions (System.Buffers.MemoryPool<byte>? pool = default, int bufferSize = -1, int minimumReadSize = -1, bool leaveOpen = false);
new System.IO.Pipelines.StreamPipeReaderOptions : System.Buffers.MemoryPool<byte> * int * int * bool -> System.IO.Pipelines.StreamPipeReaderOptions
Public Sub New (Optional pool As MemoryPool(Of Byte) = Nothing, Optional bufferSize As Integer = -1, Optional minimumReadSize As Integer = -1, Optional leaveOpen As Boolean = false)
Parâmetros
- pool
- MemoryPool<Byte>
O pool de memória a ser usado ao alocar memória.The memory pool to use when allocating memory. O valor padrão é null.The default value is null.
- bufferSize
- Int32
O tamanho mínimo do buffer a ser usado ao alugar memória de pool.The minimum buffer size to use when renting memory from the pool. O valor padrão é 4096.The default value is 4096.
- minimumReadSize
- Int32
O limite de bytes restantes no buffer antes de um novo buffer ser alocado.The threshold of remaining bytes in the buffer before a new buffer is allocated. O valor padrão é 1.024.The default value is 1024.
- leaveOpen
- Boolean
true para deixar o fluxo subjacente aberto após a conclusão de PipeReader; false para fechá-lo.true to leave the underlying stream open after the PipeReader completes; false to close it. O padrão é false.The default is false.