Table of Contents

Class StringTable

Namespace
DotFly.Core.Checkpoints
Assembly
DotFly.Core.dll

Interned string table used by checkpoint columns. Index 0 is always the empty string and stands for "not annotated".

public sealed class StringTable
Inheritance
StringTable
Inherited Members

Properties

Count

Number of strings, including the empty string at index 0.

public int Count { get; }

Property Value

int

this[uint]

Returns the string at an index.

public string this[uint index] { get; }

Parameters

index uint

Property Value

string

Strings

All strings in index order.

public IReadOnlyList<string> Strings { get; }

Property Value

IReadOnlyList<string>

Methods

Deserialize(ReadOnlySpan<byte>)

Deserialises a table produced by Serialize().

public static StringTable Deserialize(ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

Returns

StringTable

Intern(string?)

Interns a string, returning its index; null and empty map to 0.

public uint Intern(string? value)

Parameters

value string

Returns

uint

Serialize()

Serialises as uint32 count, uint32 offsets[count+1], utf8 bytes.

public byte[] Serialize()

Returns

byte[]

TryGetIndex(string)

Looks up the index of a string without interning; returns null if absent.

public uint? TryGetIndex(string value)

Parameters

value string

Returns

uint?