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 SourceModuleCount
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 SourceAddDependency(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. |
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. |
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. |