Table of Contents

Struct Transaction.ReadOnlyCollectionEnumerator<T>

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Zero-copy, read-only foreach enumerator over the elements of a component collection buffer.

public ref struct Transaction.ReadOnlyCollectionEnumerator<T> where T : unmanaged

Type Parameters

T

Unmanaged element type of the collection.

Inherited Members

Constructors

ReadOnlyCollectionEnumerator(VariableSizedBufferSegment<T, PersistentStore>, int)

Creates the enumerator over the buffer identified by bufferId within vsbs.

public ReadOnlyCollectionEnumerator(VariableSizedBufferSegment<T, PersistentStore> vsbs, int bufferId)

Parameters

vsbs VariableSizedBufferSegment<T, PersistentStore>

Segment holding the collection's variable-sized buffers.

bufferId int

Root chunk id of the buffer to enumerate.

Properties

Current

Zero-copy reference to the current element. Valid until the next MoveNext() call.

public ref readonly T Current { get; }

Property Value

T

Methods

Dispose()

Releases the underlying buffer enumerator (unpins accessed pages).

public void Dispose()

GetEnumerator()

Returns this enumerator (enables the foreach pattern).

public Transaction.ReadOnlyCollectionEnumerator<T> GetEnumerator()

Returns

Transaction.ReadOnlyCollectionEnumerator<T>

MoveNext()

Advances to the next element; returns false when the buffer is exhausted.

public bool MoveNext()

Returns

bool