Search Results for

    Show / Hide Table of Contents

    Class Sheet<T>

    Read-only KV-table sheet.

    • Loads rows from an external source (Sheets/CSV/JSON).
    • Each row must contain a non-empty unique "key" column.
    • Stores data as Dictionary<string, T> for fast lookup.
    • No CRUD; changes require reloading from the external source.
    Inheritance
    object
    SheetBase<T>
    Sheet<T>
    Inherited Members
    SheetBase<T>.IsLoaded
    SheetBase<T>.Count
    SheetBase<T>.LoadAsync(CancellationToken)
    SheetBase<T>.LoadAsync(bool, CancellationToken)
    SheetBase<T>.TryGet(string, out T)
    SheetBase<T>.GetRequired(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.Sheets
    Assembly: Glitch9.AIDevKit.Sheets.dll
    Syntax
    public sealed class Sheet<T> : SheetBase<T> where T : class, new()
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    Sheet(ITableSource, bool)

    Create a database that loads from a table source and parses each row into T.

    Declaration
    public Sheet(ITableSource source, bool trackOrder = false)
    Parameters
    Type Name Description
    ITableSource source

    Provides table rows.

    bool trackOrder

    If true, preserves row order (useful for editor UI).

    Properties

    | Edit this page View Source

    Map

    Returns a read-only view of the cached map. Valid only after LoadAsync().

    Declaration
    public override IReadOnlyDictionary<string, T> Map { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, T>
    Overrides
    SheetBase<T>.Map
    | Edit this page View Source

    Order

    Returns the row order as loaded. Valid only after LoadAsync(). May be empty if order tracking is disabled.

    Declaration
    public IReadOnlyList<string> Order { get; }
    Property Value
    Type Description
    IReadOnlyList<string>

    Methods

    | Edit this page View Source

    LoadAsyncInternal(bool, CancellationToken)

    Declaration
    protected override UniTask LoadAsyncInternal(bool loadAllObjectReferences, CancellationToken ct = default)
    Parameters
    Type Name Description
    bool loadAllObjectReferences
    CancellationToken ct
    Returns
    Type Description
    UniTask
    Overrides
    SheetBase<T>.LoadAsyncInternal(bool, CancellationToken)

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation