Megosztás a következőn keresztül:


VBufferEditor<T> Struct

Definition

An object capable of editing a VBuffer<T> by filling out Values (and Indices if the buffer is not dense).

public readonly ref struct VBufferEditor<T>
type VBufferEditor<'T> = struct
Public Structure VBufferEditor(Of T)

Type Parameters

T
Inheritance
VBufferEditor<T>

Remarks

The VBuffer<T> structure by itself is immutable. However, the purpose of VBuffer<T> is to enable buffer re-use we can edit them through this structure, as created through Create<T>(VBuffer<T>, Int32, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean) or CreateFromBuffer<T>(VBuffer<T>).

Fields

Indices

The mutable span of indices.

Values

The mutable span of values.

Properties

CreatedNewIndices

Gets a value indicating whether a new Indices array was allocated.

CreatedNewValues

Gets a value indicating whether a new Values array was allocated.

Methods

Commit()

Commits the edits and creates a new VBuffer<T> using the current Values and Indices. Note that this structure and its properties should not be used once this is called.

CommitTruncated(Int32)

Commits the edits and creates a new VBuffer<T> using the current Values and Indices, while allowing to truncate the length of Values and, if sparse, Indices. Like Commit(), this structure and its properties should not be used once this is called.

Applies to