Table of Contents

Class PrimitiveRecordStore.Record

Namespace
BelNytheraSeiche.TrieDictionary
Assembly
BelNytheraSeiche.TrieDictionary.dll

Represents a handle to a single record within the store.

public sealed class PrimitiveRecordStore.Record
Inheritance
PrimitiveRecordStore.Record
Inherited Members

Remarks

This object is a proxy that provides methods to read, update, and navigate the record's data and relationships. Operations performed on this object modify the underlying data in the parent PrimitiveRecordStore.

Properties

Actual

Gets the actual size of the record's content in bytes.

public int Actual { get; }

Property Value

int

Capacity

Gets the total allocated storage capacity for the record's content in bytes.

public int Capacity { get; }

Property Value

int

ExByte

Gets or sets an extra, user-definable byte of metadata associated with this record. The value must be in the range of 0 to 255.

public int ExByte { get; set; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

The assigned value is less than 0 or greater than 255.

Identifier

Gets the unique, persistent identifier for this record within the store.

public int Identifier { get; }

Property Value

int

Next

Gets the next record in the linked list, or null if this is the last record.

public PrimitiveRecordStore.Record? Next { get; }

Property Value

PrimitiveRecordStore.Record

Methods

Clear()

Clears the content of the record, setting its length to zero.

public void Clear()

InsertAfter(ReadOnlySpan<byte>)

Inserts a new record with the specified content immediately after this record in the list.

public PrimitiveRecordStore.Record InsertAfter(ReadOnlySpan<byte> content)

Parameters

content ReadOnlySpan<byte>

The content of the new record to insert.

Returns

PrimitiveRecordStore.Record

A PrimitiveRecordStore.Record handle for the newly inserted record.

InsertBefore(ReadOnlySpan<byte>)

Inserts a new record with the specified content immediately before this record in the list.

public PrimitiveRecordStore.Record InsertBefore(ReadOnlySpan<byte> content)

Parameters

content ReadOnlySpan<byte>

The content of the new record to insert.

Returns

PrimitiveRecordStore.Record

A PrimitiveRecordStore.Record handle for the newly inserted record.

Read()

Reads the content of the record.

public ReadOnlySpan<byte> Read()

Returns

ReadOnlySpan<byte>

A read-only span of bytes representing the record's content.

Remove()

Removes this record from the linked list it belongs to.

public void Remove()

Update(ReadOnlySpan<byte>)

Updates the content of the record.

public void Update(ReadOnlySpan<byte> content)

Parameters

content ReadOnlySpan<byte>

The new content for the record.