Modifica

Condividi tramite


IBuffer<T> Interface

Definition

An interface that expands IBufferWriter<T> with the ability to also inspect the written data, and to reset the underlying buffer to write again from the start.

public interface IBuffer<T> : System.Buffers.IBufferWriter<T>
type IBuffer<'T> = interface
    interface IBufferWriter<'T>
Public Interface IBuffer(Of T)
Implements IBufferWriter(Of T)

Type Parameters

T

The type of items in the current buffer.

Derived
Implements

Properties

Capacity

Gets the total amount of space within the underlying buffer.

FreeCapacity

Gets the amount of space available that can still be written into without forcing the underlying buffer to grow.

WrittenCount

Gets the amount of data written to the underlying buffer so far.

WrittenMemory

Gets the data written to the underlying buffer so far, as a ReadOnlyMemory<T>.

WrittenSpan

Gets the data written to the underlying buffer so far, as a ReadOnlySpan<T>.

Methods

Clear()

Clears the data written to the underlying buffer.

Extension Methods

Write<T>(IBufferWriter<T>, T)

Writes a value of a specified type into a target IBufferWriter<T> instance.

Write<T>(IBufferWriter<T>, ReadOnlySpan<T>)
Write<T>(IBufferWriter<T>, T)

Writes a value of a specified type into a target IBufferWriter<T> instance.

Write<T>(IBufferWriter<T>, ReadOnlySpan<T>)
Write<T>(IBufferWriter<T>, T)

Writes a value of a specified type into a target IBufferWriter<T> instance.

Applies to