GroupByExtensions.

GroupByMany<TSource, TKey>(IEnumerable<TSource>, Func<TSource, IEnumerable<TKey>>, IEqualityComparer<TKey>) Method

Summary

Groups the elements of a sequence according to a specified key selector function that returns a sequence of keys and compares the keys by using a specified comparer.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Util
Containing Type
GroupByExtensions

Syntax

public static IEnumerable<IGrouping<TKey, TSource>> GroupByMany<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TKey>> keySelector, IEqualityComparer<TKey> comparer)

Type Parameters

Name Description
TSource The type of the source.
TKey The type of the key.

Parameters

Name Type Description
source IEnumerable<TSource> The source.
keySelector Func<TSource, IEnumerable<TKey>> The key selector.
comparer IEqualityComparer<TKey> The comparer.

Return Value

Type Description
IEnumerable<IGrouping<TKey, TSource>> A sequence of groups.
GitHub