Summary
Sorts a collection of Weaver.IDependant`1
.
If ItemA depends on ItemB, ItemA will be put later in the returned list.
Syntax
public static List<T> TopologicalSort<T>(IEnumerable<T> collection, bool ignoreCycles = false)
where T : IDependant<T>
Type Parameters
Parameters
Name |
Type |
Description |
collection |
IEnumerable<T> |
The collection to sort. If any item depends on a type that isn't present, it will be added automatically. |
ignoreCycles |
bool |
If false, an System.ArgumentException will be thrown when a cyclic dependancy is encountered. |
Return Value