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

StreamPipeWriterOptions

Represents a set of options for controlling the creation of the PipeWriter.
using System.Buffers; using System.Runtime.CompilerServices; namespace System.IO.Pipelines { [NullableContext(1)] [Nullable(0)] public class StreamPipeWriterOptions { internal static readonly StreamPipeWriterOptions s_default = new StreamPipeWriterOptions(null, -1, false); public int MinimumBufferSize { get; } public MemoryPool<byte> Pool { get; } public bool LeaveOpen { get; } [NullableContext(2)] public StreamPipeWriterOptions(MemoryPool<byte> pool = null, int minimumBufferSize = -1, bool leaveOpen = false) { Pool = (pool ?? MemoryPool<byte>.Shared); int num; if (minimumBufferSize != -1) { if (minimumBufferSize <= 0) throw new ArgumentOutOfRangeException("minimumBufferSize"); num = minimumBufferSize; } else num = 4096; MinimumBufferSize = num; LeaveOpen = leaveOpen; } } }