Interface IResource
A node in Typhon's runtime resource graph: a named, typed element of the engine tree that owns child resources and participates in lifecycle (disposal) and diagnostic snapshotting. Nodes with measurable state additionally implement IMetricSource.
public interface IResource : IDisposable
- Inherited Members
- Extension Methods
Properties
Children
Direct child resources, in no particular order.
IEnumerable<IResource> Children { get; }
Property Value
Count
Optional scalar count exposed to UIs (Workbench tree badges, diagnostics). For ComponentTable this is the entity count; for a segments folder it could be the segment count. Structural nodes with no meaningful count return null.
int? Count { get; }
Property Value
- int?
CreatedAt
UTC timestamp captured when this node was constructed.
DateTime CreatedAt { get; }
Property Value
Id
Stable identifier, unique among siblings. Forms one segment of the node's tree path (e.g. "PageCache" in "Storage/PageCache").
string Id { get; }
Property Value
Name
Human-readable display label. May equal Id for structural nodes whose id is already self-describing (e.g. "Storage"), but for resources with synthetic ids (GUIDs, hex suffixes) this is the user-facing name the Workbench and diagnostics should surface.
string Name { get; }
Property Value
Owner
Registry that owns the tree this node belongs to.
IResourceRegistry Owner { get; }
Property Value
Parent
Parent node in the tree, or null for the root.
IResource Parent { get; }
Property Value
Type
Classification of this resource, used for filtering and display.
ResourceType Type { get; }
Property Value
Methods
RegisterChild(IResource)
Attaches child under this node and raises NodeMutated with
Added.
bool RegisterChild(IResource child)
Parameters
childIResourceThe resource to attach.
Returns
RemoveChild(IResource)
Detaches resource from this node and raises NodeMutated with
Removed.
bool RemoveChild(IResource resource)
Parameters
resourceIResourceThe child resource to detach.
Returns
- bool
trueif detached;falseif it was not a child of this node.