PipeOptions 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定的参数初始化类的新实例 PipeOptions 。
public PipeOptions(System.Buffers.MemoryPool<byte>? pool = default, System.IO.Pipelines.PipeScheduler? readerScheduler = default, System.IO.Pipelines.PipeScheduler? writerScheduler = default, long pauseWriterThreshold = -1, long resumeWriterThreshold = -1, int minimumSegmentSize = -1, bool useSynchronizationContext = true);
new System.IO.Pipelines.PipeOptions : System.Buffers.MemoryPool<byte> * System.IO.Pipelines.PipeScheduler * System.IO.Pipelines.PipeScheduler * int64 * int64 * int * bool -> System.IO.Pipelines.PipeOptions
Public Sub New (Optional pool As MemoryPool(Of Byte) = Nothing, Optional readerScheduler As PipeScheduler = Nothing, Optional writerScheduler As PipeScheduler = Nothing, Optional pauseWriterThreshold As Long = -1, Optional resumeWriterThreshold As Long = -1, Optional minimumSegmentSize As Integer = -1, Optional useSynchronizationContext As Boolean = true)
参数
- pool
- MemoryPool<Byte>
要用于缓冲区管理的内存块池。
- readerScheduler
- PipeScheduler
PipeScheduler用于执行PipeReader回调和异步延续。
- writerScheduler
- PipeScheduler
PipeScheduler用于执行PipeWriter回调和异步延续。
- pauseWriterThreshold
- Int64
开始阻止之前FlushAsync(CancellationToken)字节Pipe数。 值为零会 FlushAsync(CancellationToken) 阻止永远阻止,从而有效地使无限 Pipe 字节数。
- resumeWriterThreshold
- Int64
停止阻塞时的FlushAsync(CancellationToken)字节Pipe数。
- minimumSegmentSize
- Int32
从 pool中请求的段的最小大小。
- useSynchronizationContext
- Boolean
true 如果应在捕获的延续上 SynchronizationContext 执行异步延续,则为 ;否则为 false 。 这优先于在和