NDepend.API Documentation
ToMultiKeyLookup<T,TKey> Method
NDepend.Helpers Namespace > ExtensionMethodsEnumerable Class : ToMultiKeyLookup<T,TKey> Method
The type of the elements of seq.
The type of the keys in the result Lookup.
An IEnumerable<T> to create an hashset from.
A function to extract a sequence of keys from each element.
Creates a Lookup from an IEnumerable according to a specified key selector function. The funtion can return zero, one or several keys for an element..
Syntax

Parameters

seq
An IEnumerable<T> to create an hashset from.
func
A function to extract a sequence of keys from each element.

Type Parameters

T
The type of the elements of seq.
TKey
The type of the keys in the result Lookup.

Return Value

An hashset that contains the elements from the input sequence.
Remarks
The difference with is that an element can have zero, one or several keys.
Hence an element can be contained in several groups, if it has several keys.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsEnumerable Class
ExtensionMethodsEnumerable Members
ToLookup
ToLookup