StreamPipeWriterOptions(MemoryPool<Byte>, Int32, Boolean) Constructor

Definition

Initializes a StreamPipeWriterOptions instance, optionally specifying a memory pool, a minimum buffer size, and whether the underlying stream should be left open after the PipeWriter completes.

C#
public StreamPipeWriterOptions(System.Buffers.MemoryPool<byte>? pool = default, int minimumBufferSize = -1, bool leaveOpen = false);

Parameters

pool
MemoryPool<Byte>

The memory pool to use when allocating memory. The default value is null.

minimumBufferSize
Int32

The minimum buffer size to use when renting memory from the pool. The default value is 4096.

leaveOpen
Boolean

true to leave the underlying stream open after the PipeWriter completes; false to close it. The default is false.

Applies to

Produit Versions
.NET 8 (package-provided), 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)