Uredi

Deli z drugimi prek


PipeOptions Constructor

Definition

Initializes a new instance of the PipeOptions class with the specified parameters.

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)

Parameters

pool
MemoryPool<Byte>

The pool of memory blocks to be used for buffer management.

readerScheduler
PipeScheduler

The PipeScheduler to be used to execute PipeReader callbacks and async continuations.

writerScheduler
PipeScheduler

The PipeScheduler used to execute PipeWriter callbacks and async continuations.

pauseWriterThreshold
Int64

The number of bytes in the Pipe before FlushAsync(CancellationToken) starts blocking. A value of zero prevents FlushAsync(CancellationToken) from ever blocking, effectively making the number of bytes in the Pipe unlimited.

resumeWriterThreshold
Int64

The number of bytes in the Pipe when FlushAsync(CancellationToken) stops blocking.

minimumSegmentSize
Int32

The minimum size of the segment requested from pool.

useSynchronizationContext
Boolean

true if asynchronous continuations should be executed on the SynchronizationContext they were captured on; false otherwise. This takes precedence over the schedulers specified in ReaderScheduler and WriterScheduler.

Applies to