<PackageReference Include="System.IO.Pipelines" Version="10.0.0-preview.3.25171.5" />

StreamPipeReaderOptions

Represents a set of options for controlling the creation of the PipeReader.
public int BufferSize { get; }

Gets the minimum buffer size to use when renting memory from the Pool.

public bool LeaveOpen { get; }

Gets the value that indicates if the underlying stream should be left open after the PipeReader completes.

public int MinimumReadSize { get; }

Gets the threshold of remaining bytes in the buffer before a new buffer is allocated.

public MemoryPool<byte> Pool { get; }

Gets the MemoryPool<T> to use when allocating memory.

public bool UseZeroByteReads { get; }

Gets the value that indicates if reads with an empty buffer should be issued to the underlying stream, in order to wait for data to arrive before allocating memory.

public StreamPipeReaderOptions(MemoryPool<byte> pool, int bufferSize, int minimumReadSize, bool leaveOpen)

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(MemoryPool<byte> pool = null, int bufferSize = -1, int minimumReadSize = -1, bool leaveOpen = false, bool useZeroByteReads = false)

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.