System.Buffers Namespace (original) (raw)

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Contains types used in creating and managing memory buffers, such as those represented by Span and Memory.

Classes

Name Description
ArrayBufferWriter Represents a heap-based, array-backed output sink into which T data can be written.
ArrayPool Provides a resource pool that enables reusing instances of type T[].
BuffersExtensions Provides extension methods for ReadOnlySequence.
MemoryManager An abstract base class that is used to replace the implementation of Memory.
MemoryPool Represents a pool of memory blocks.
ReadOnlySequenceSegment Represents a linked list of ReadOnlyMemory nodes.
SearchValues Provides a set of initialization methods for instances of the SearchValues class.
SearchValues Provides an immutable, read-only set of values optimized for efficient searching. Instances are created by Create(ReadOnlySpan) or Create(ReadOnlySpan).
SequenceReaderExtensions Provides extended functionality for the SequenceReader class that allows reading of endian specific numeric values from binary data.

Structs

Name Description
MemoryHandle Provides a memory handle for a block of memory.
NIndex Represents a type that can be used to index a collection either from the start or the end.
NRange Represents a range that has start and end indices.
ReadOnlySequence.Enumerator Represents an enumerator over a ReadOnlySequence.
ReadOnlySequence Represents a sequence that can read a sequential series of T.
SequenceReader Provides methods for reading binary and text data out of a ReadOnlySequence with a focus on performance and minimal or zero heap allocations.
StandardFormat Represents a standard format string without using an actual string.

Interfaces

Name Description
IBufferWriter Represents an output sink into which T data can be written.
IMemoryOwner 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.

Enums

Name Description
OperationStatus Defines the values that can be returned from span-based operations that support processing of input contained in multiple discontiguous buffers.

Delegates

Name Description
ReadOnlySpanAction<T,TArg> Encapsulates a method that receives a read-only span of objects of type T and a state object of type TArg.
SpanAction<T,TArg> Encapsulates a method that receives a span of objects of type T and a state object of type TArg.