ToLookupExtensions.

ToLookupMany<TSource, TKey>(IEnumerable<TSource>, Func<TSource, IEnumerable<TKey>>) Method

Summary

Creates a lookup from a sequence according to a specified key selector function that returns a sequence of keys.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Util
Containing Type
ToLookupExtensions

Syntax

public static ILookup<TKey, TSource> ToLookupMany<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TKey>> keySelector)

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.

Return Value

Type Description
ILookup<TKey, TSource> A lookup.
GitHub