logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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
    object
    InstallableSystemDependencyOrder
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.CreateGame.Infrastructure.Editor.Systems
    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
    Type Name Description
    IReadOnlyList<InstallableSystemDependencyOrder.Node> nodes
    Returns
    Type Description
    IReadOnlyList<string>

    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
    Type Name Description
    IReadOnlyList<InstallableSystemDependencyOrder.Node> nodes
    Returns
    Type Description
    IReadOnlyDictionary<string, int>
    In this article
    © 2026 Serenity. All Rights Reserved