Class TopologicalSort
Inheritance
System.Object
TopologicalSort
Namespace: PnP.Framework.Extensions
Assembly: PnP.Framework.dll
Syntax
public static class TopologicalSort : object
Methods
Group<T>(IEnumerable<T>, Func<T, IEnumerable<T>>, IEqualityComparer<T>, Boolean)
Declaration
public static IList<ICollection<T>> Group<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> getDependencies, IEqualityComparer<T> comparer = null, bool ignoreCycles = true)
Parameters
IEnumerable<T>
source
|
Func<T, IEnumerable<T>>
getDependencies
|
IEqualityComparer<T>
comparer
|
System.Boolean
ignoreCycles
|
Returns
IList<ICollection<T>>
|
Type Parameters
T
|
Group<T, TKey>(IEnumerable<T>, Func<T, IEnumerable<TKey>>, Func<T, TKey>, Boolean)
Declaration
public static IList<ICollection<T>> Group<T, TKey>(this IEnumerable<T> source, Func<T, IEnumerable<TKey>> getDependencies, Func<T, TKey> getKey, bool ignoreCycles = true)
Parameters
IEnumerable<T>
source
|
Func<T, IEnumerable<TKey>>
getDependencies
|
Func<T, TKey>
getKey
|
System.Boolean
ignoreCycles
|
Returns
IList<ICollection<T>>
|
Type Parameters
T
|
TKey
|
Sort<T>(IEnumerable<T>, Func<T, IEnumerable<T>>, IEqualityComparer<T>, Boolean)
Declaration
public static IList<T> Sort<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> getDependencies, IEqualityComparer<T> comparer = null, bool ignoreCycles = false)
Parameters
IEnumerable<T>
source
|
Func<T, IEnumerable<T>>
getDependencies
|
IEqualityComparer<T>
comparer
|
System.Boolean
ignoreCycles
|
Returns
IList<T>
|
Type Parameters
T
|
Sort<T, TKey>(IEnumerable<T>, Func<T, IEnumerable<TKey>>, Func<T, TKey>, Boolean)
Declaration
public static IList<T> Sort<T, TKey>(this IEnumerable<T> source, Func<T, IEnumerable<TKey>> getDependencies, Func<T, TKey> getKey, bool ignoreCycles = false)
Parameters
IEnumerable<T>
source
|
Func<T, IEnumerable<TKey>>
getDependencies
|
Func<T, TKey>
getKey
|
System.Boolean
ignoreCycles
|
Returns
IList<T>
|
Type Parameters
T
|
TKey
|