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.
Inherited Members
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 SourceSheet(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 SourceMap
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
| Edit this page View SourceOrder
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 SourceLoadAsyncInternal(bool, CancellationToken)
Declaration
protected override UniTask LoadAsyncInternal(bool loadAllObjectReferences, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | loadAllObjectReferences | |
| CancellationToken | ct |
Returns
| Type | Description |
|---|---|
| UniTask |