Inno.Core.Collections
Section titled “Inno.Core.Collections”
- Deterministic dependency relationships and reference-identity object indexes without resource lifecycle ownership.
This foundation supplies two distinct containers: a keyed directed dependency graph and a dense object store with typed indexes. It owns collection structure, not the lifetimes of the objects or domain resources represented by its keys.
Graph and store contract
Section titled “Graph and store contract”Dependency edges point from consumer to dependency. Cycles are accepted by mutation and explicitly rejected by operations that require a DAG. Topological order places dependencies first; a supplied comparer or insertion order makes eligible-node ordering deterministic. Internal synchronization does not make several calls one atomic domain transaction.
Object membership uses reference identity. Keys are explicit typed values, not automatically observed object properties. Unique collision rejects replacement; ordered keys require a comparer. Query planning chooses an indexed candidate seed before checking remaining conditions, and ordered ties use current dense position. Snapshots copy membership references, not object state. Fast enumeration requires no concurrent mutation and fails on detected version changes.
Store callbacks must not mutate or reenter public queries while a snapshot holds a nonrecursive read lock. Custom candidate sets must be complete for their conditions. Store locks do not synchronize the objects’ own fields, and removal/clearing does not dispose them.
Use keys only with their original store and discard all keys after Clear. The current key representation lacks a reset epoch, so isValid is not a durable stale-handle guarantee after IDs are reused. RemoveKey relies on the caller supplying the exact owning store. RemoveAll preserves key definitions; Clear removes them. Weak key handles do not retain the store, and entry validity is membership rather than persistent engine identity.
API reference
Section titled “API reference”Browse the exact types and member contracts in the selected CLR surface. Each declaration links to its captured source and preserves its shared constraints.
Source project facts
Section titled “Source project facts”Project: Inno.Core.Collections
Source: src/foundation/core/Inno.Core.Collections/Inno.Core.Collections.csproj
| Type | API | Description |
|---|---|---|
| DependencyGraph<TKey> | engine | Stores a directed dependency graph and provides deterministic dependency queries. |
| IIndexedObjectQueryCondition<T> | engine | Defines one condition evaluated by an object-store query. |
| IndexedObjectEntry<T> | engine | Entry wrapper for setting key values on a stored item. |
| IndexedObjectKeyCondition<T, TKey> | engine | Matches object-store items associated with one indexed key value. |
| IndexedObjectKeyFlags | engine | Defines indexing and cardinality behavior for an object-store key. |
| IndexedObjectKey<TKey> | engine | Opaque handle used to query a key without exposing its implementation. |
| IndexedObjectPredicateCondition<T> | engine | Matches object-store items by evaluating a predicate. |
| IndexedObjectQuery<T> | engine | Query builder over store keys. |
| IndexedObjectStore<T> | engine | Thread-safe object store with optional query keys over stored items. |