Поделиться через


PipeOptions Конструктор

Определение

Инициализирует новый экземпляр класса PipeOptions с заданными параметрами.

public PipeOptions (System.Buffers.MemoryPool<byte> pool = default, System.IO.Pipelines.PipeScheduler readerScheduler = default, System.IO.Pipelines.PipeScheduler writerScheduler = default, long pauseWriterThreshold = 32768, long resumeWriterThreshold = 16384, int minimumSegmentSize = 2048, bool useSynchronizationContext = true);
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);
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 = 32768, Optional resumeWriterThreshold As Long = 16384, Optional minimumSegmentSize As Integer = 2048, Optional useSynchronizationContext As Boolean = true)
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

Число байтов в Pipe до того, как метод FlushAsync(CancellationToken) начинает блокирование. Значение, равное нулю, запрещает методу FlushAsync(CancellationToken) выполнять блокирование, вследствие чего число байтов в Pipe будет неограниченным.

resumeWriterThreshold
Int64

Число байтов в Pipe, когда метод FlushAsync(CancellationToken) прекращает блокирование.

minimumSegmentSize
Int32

Минимальный размер сегмента, запрашиваемого из pool.

useSynchronizationContext
Boolean

true, если асинхронные продолжения должны выполняться в контексте SynchronizationContext, в котором они были зарегистрированы, в противном случае false. Это свойство имеет более высокий приоритет, чем планировщики, указанные в ReaderScheduler и WriterScheduler.

Применяется к