Class TopologicalSorter
Topological Sort algorithm for sorting items based on dependencies.
Use the static method TopologicalSorter.GetSortedItems for a convenient
way of sorting a list of items with dependencies between them.
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public class TopologicalSorter
Constructors
TopologicalSorter(Int32)
Declaration
public TopologicalSorter(int size)
Parameters
Type |
Name |
Description |
System.Int32 |
size |
|
Methods
AddEdge(Int32, Int32)
Declaration
public void AddEdge(int start, int end)
Parameters
Type |
Name |
Description |
System.Int32 |
start |
|
System.Int32 |
end |
|
AddVertex(Int32)
Declaration
public int AddVertex(int vertex)
Parameters
Type |
Name |
Description |
System.Int32 |
vertex |
|
Returns
Type |
Description |
System.Int32 |
|
GetSortedItems<T>(List<TopologicalSorter.DependencyField<T>>)
Declaration
public static IEnumerable<T> GetSortedItems<T>(List<TopologicalSorter.DependencyField<T>> fields)where T : class
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
Sort()
Declaration
Returns
Type |
Description |
System.Int32[] |
|