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
this[uint]
Returns the string at an index.
public string this[uint index] { get; }
Parameters
indexuint
Property Value
Strings
All strings in index order.
public IReadOnlyList<string> Strings { get; }
Property Value
Methods
Deserialize(ReadOnlySpan<byte>)
Deserialises a table produced by Serialize().
public static StringTable Deserialize(ReadOnlySpan<byte> data)
Parameters
dataReadOnlySpan<byte>
Returns
Intern(string?)
Interns a string, returning its index; null and empty map to 0.
public uint Intern(string? value)
Parameters
valuestring
Returns
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
valuestring
Returns
- uint?