PipeOptions Konstruktor
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Inicjuje PipeOptions nowe wystąpienie klasy z określonymi parametrami.
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)
Parametry
- pool
- MemoryPool<Byte>
Pula bloków pamięci, które mają być używane do zarządzania buforami.
- readerScheduler
- PipeScheduler
Element PipeScheduler , który ma być używany do wykonywania PipeReader wywołań zwrotnych i kontynuacji asynchronicznych.
- writerScheduler
- PipeScheduler
Element PipeScheduler używany do wykonywania PipeWriter wywołań zwrotnych i kontynuacji asynchronicznych.
- pauseWriterThreshold
- Int64
Liczba bajtów w przed FlushAsync(CancellationToken) rozpoczęciem Pipe blokowania. Wartość zero uniemożliwia FlushAsync(CancellationToken) zawsze blokowanie, co skutecznie sprawia, że liczba bajtów w nieograniczonej Pipe liczbie.
- resumeWriterThreshold
- Int64
Liczba bajtów w Pipe obiekcie , gdy FlushAsync(CancellationToken) zatrzymuje się blokowanie.
- minimumSegmentSize
- Int32
Minimalny rozmiar segmentu żądanego od pool
.
- useSynchronizationContext
- Boolean
true
jeśli kontynuacje asynchroniczne powinny być wykonywane na obiekcie, na których SynchronizationContext zostały przechwycone; false
w przeciwnym razie. Ma to pierwszeństwo przed harmonogramami określonymi w i ReaderSchedulerWriterScheduler.