RepositoryExtensionsTopologicalSortT Method |
Topological sort based on item dependencies.
Namespace:
Aloe.SystemFrameworks.Domain.Extensions
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic static IEnumerable<T> TopologicalSort<T>(
this IEnumerable<T> nodes,
Func<T, T, bool> isDependantOn
)
<ExtensionAttribute>
Public Shared Function TopologicalSort(Of T) (
nodes As IEnumerable(Of T),
isDependantOn As Func(Of T, T, Boolean)
) As IEnumerable(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<T>^ TopologicalSort(
IEnumerable<T>^ nodes,
Func<T, T, bool>^ isDependantOn
)
[<ExtensionAttribute>]
static member TopologicalSort :
nodes : IEnumerable<'T> *
isDependantOn : Func<'T, 'T, bool> -> IEnumerable<'T>
Parameters
- nodes
- Type: System.Collections.GenericIEnumerableT
The nodes. - isDependantOn
- Type: SystemFuncT, T, Boolean
The item1 is dependent on item2.
Type Parameters
- T
Return Value
Type:
IEnumerableTUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also