System.Buffers Namespace

System.Buffers 命名空間包含用於建立和管理記憶體緩衝區的型別,例如 Span<T>Memory<T> 所代表的型別。 The System.Buffers namespace contains types used in creating and managing memory buffers, such as those represented by Span<T> and Memory<T>.

類別

ArrayBufferWriter<T>

代表堆積型的陣列支援輸出接收,Represents a heap-based, array-backed output sink into which 可以寫入資料。data can be written.

ArrayPool<T>

提供可以重複使用類型 T[] 執行個體的資源集區。Provides a resource pool that enables reusing instances of type T[].

BuffersExtensions

提供 ReadOnlySequence<T> 的擴充方法。Provides extension methods for ReadOnlySequence<T>.

MemoryManager<T>

用以取代 Memory<T> 實作的抽象基底類別。An abstract base class that is used to replace the implementation of Memory<T>.

MemoryPool<T>

表示記憶體區塊的集區。Represents a pool of memory blocks.

ReadOnlySequenceSegment<T>

代表 ReadOnlyMemory<T> 節點的連結清單。Represents a linked list of ReadOnlyMemory<T> nodes.

SequenceReaderExtensions

提供 SequenceReader<T> 類別的擴充功能,可允許從二進位資料讀取位元組排列法特定數值。Provides extended functionality for the SequenceReader<T> class that allows reading of endian specific numeric values from binary data.

結構

MemoryHandle

提供記憶體區塊的記憶體控制代碼。Provides a memory handle for a block of memory.

ReadOnlySequence<T>.Enumerator

透過 ReadOnlySequence<T> 表示列舉程式。Represents an enumerator over a ReadOnlySequence<T>.

ReadOnlySequence<T>

代表可讀取 T 循序序列的序列。Represents a sequence that can read a sequential series of T.

SequenceReader<T>

提供用來從 ReadOnlySequence<T> 讀取二進位資料和文字資料的方法,並著重於效能以及為最小或零的堆積配置。Provides methods for reading binary and text data out of a ReadOnlySequence<T> with a focus on performance and minimal or zero heap allocations.

StandardFormat

代表不使用實際字串的標準格式字串。Represents a standard format string without using an actual string.

介面

IBufferWriter<T>

代表可在其中寫入 T 資料的輸出接收。Represents an output sink into which T data can be written.

IMemoryOwner<T>

識別記憶體區塊的擁有者,該擁有者負責妥善地處置基礎記憶體。Identifies the owner of a block of memory who is responsible for disposing of the underlying memory appropriately.

IPinnable

提供釘選和取消釘選物件的機制,以防止記憶體回收行程移動這些物件。Provides a mechanism for pinning and unpinning objects to prevent the garbage collector from moving them.

列舉

OperationStatus

定義可以從範圍型作業傳回的值,這些作業支援處理多個不連續緩衝區中包含的輸入。Defines the values that can be returned from span-based operations that support processing of input contained in multiple discontiguous buffers.

委派

ReadOnlySpanAction<T,TArg>
SpanAction<T,TArg>