Class InstallableSystemDependencyOrder
Pure, reflection-free level-ordered topological sort over a declared dependency graph of installable
systems: level 0 holds every system with no prerequisites, and a system's level is one past the
highest level among the systems it depends on. Within a level, systems are ordered bootstrap-first,
then by SerenityInstallableSystemTier, then by display name (ordinal), so the result is
a single deterministic sequence in which a system never precedes a prerequisite named in its own
DependsOn. SerenityInstallableSystemCatalog resolves its
reflection-discovered methods into InstallableSystemDependencyOrder.Nodes and hands them here; kept separate so the
ordering rules are testable against a synthetic graph with no AppDomain scan involved.
Inheritance
InstallableSystemDependencyOrder
Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
Syntax
public static class InstallableSystemDependencyOrder
Methods
Compute(IReadOnlyList<Node>)
Every name in nodes, in the level-ordered sequence described in the
type summary. Throws InvalidOperationException when a node declares a dependency on
an unknown name, or when the graph contains a cycle.
Declaration
public static IReadOnlyList<string> Compute(IReadOnlyList<InstallableSystemDependencyOrder.Node> nodes)
Parameters
Returns
ComputeLevels(IReadOnlyList<Node>)
Assigns each node the level 1 + max(level of its dependencies): level 0 holds every
zero-dependency node, so every such node precedes any node that depends on something. Exposed
separately from Compute(IReadOnlyList<Node>) so the level assignment itself is directly assertable in
tests, against a synthetic graph with no AppDomain scan involved.
Declaration
public static IReadOnlyDictionary<string, int> ComputeLevels(IReadOnlyList<InstallableSystemDependencyOrder.Node> nodes)
Parameters
Returns