Show / Hide Table of Contents

Class ModuleDependencySolver

Used by ModuleInitializer to get the load sequence for the modules to load according to their dependencies.

Inheritance
System.Object
ModuleDependencySolver
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation.Modularity
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class ModuleDependencySolver

Properties

View Source

ModuleCount

Gets the number of modules added to the solver.

Declaration
public int ModuleCount { get; }
Property Value
Type Description
System.Int32

The number of modules.

Methods

View Source

AddDependency(String, String)

Adds a module dependency between the modules specified by dependingModule and dependentModule.

Declaration
public void AddDependency(string dependingModule, string dependentModule)
Parameters
Type Name Description
System.String dependingModule

The name of the module with the dependency.

System.String dependentModule

The name of the module dependingModule depends on.

View Source

AddModule(String)

Adds a module to the solver.

Declaration
public void AddModule(string name)
Parameters
Type Name Description
System.String name

The name that uniquely identifies the module.

View Source

Solve()

Calculates an ordered vector according to the defined dependencies. Non-dependant modules appears at the beginning of the resulting array.

Declaration
public string[] Solve()
Returns
Type Description
System.String[]

The resulting ordered list of modules.

Exceptions
Type Condition
CyclicDependencyFoundException

This exception is thrown when a cycle is found in the defined depedency graph.

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX