Uredi

Deli z drugimi prek


ParallelEnumerable.ToLookup Method

Definition

Overloads

ToLookup<TSource,TKey,TElement>(ParallelQuery<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

Creates an ILookup<TKey,TElement> from a ParallelQuery<TSource> according to a specified key selector function, a comparer and an element selector function.

ToLookup<TSource,TKey,TElement>(ParallelQuery<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

Creates an ILookup<TKey,TElement> from a ParallelQuery<TSource> according to specified key selector and element selector functions.

ToLookup<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Creates an ILookup<TKey,TElement> from a ParallelQuery<TSource> according to a specified key selector function and key comparer.

ToLookup<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>)

Creates an ILookup<TKey,TElement> from a ParallelQuery<TSource> according to a specified key selector function.

ToLookup<TSource,TKey,TElement>(ParallelQuery<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Creates an ILookup<TKey,TElement> from a ParallelQuery<TSource> according to a specified key selector function, a comparer and an element selector function.

public:
generic <typename TSource, typename TKey, typename TElement>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ILookup<TKey, TElement> ^ ToLookup(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TElement> ^ elementSelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Linq.ILookup<TKey,TElement> ToLookup<TSource,TKey,TElement> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TElement> elementSelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
public static System.Linq.ILookup<TKey,TElement> ToLookup<TSource,TKey,TElement> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TElement> elementSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
static member ToLookup : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> * Func<'Source, 'Element> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Linq.ILookup<'Key, 'Element>
<Extension()>
Public Function ToLookup(Of TSource, TKey, TElement) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TElement), comparer As IEqualityComparer(Of TKey)) As ILookup(Of TKey, TElement)

Type Parameters

TSource

The type of elements of source.

TKey

The type of the key returned by keySelector.

TElement

The type of the value returned by elementSelector.

Parameters

source
ParallelQuery<TSource>

The sequence to create a ILookup<TKey,TElement> from.

keySelector
Func<TSource,TKey>

A function to extract a key from each element.

elementSelector
Func<TSource,TElement>

A transform function to produce a result element value from each element.

comparer
IEqualityComparer<TKey>

An IEqualityComparer<T> to compare keys.

Returns

A Lookup<(Of <(TKey, TElement>)>) that contains values of type TElement selected from the input sequence.

Exceptions

source or keySelector or elementSelector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

See also

Applies to

ToLookup<TSource,TKey,TElement>(ParallelQuery<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Creates an ILookup<TKey,TElement> from a ParallelQuery<TSource> according to specified key selector and element selector functions.

public:
generic <typename TSource, typename TKey, typename TElement>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ILookup<TKey, TElement> ^ ToLookup(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TElement> ^ elementSelector);
public static System.Linq.ILookup<TKey,TElement> ToLookup<TSource,TKey,TElement> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TElement> elementSelector);
static member ToLookup : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> * Func<'Source, 'Element> -> System.Linq.ILookup<'Key, 'Element>
<Extension()>
Public Function ToLookup(Of TSource, TKey, TElement) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TElement)) As ILookup(Of TKey, TElement)

Type Parameters

TSource

The type of elements of source.

TKey

The type of the key returned by keySelector.

TElement

The type of the value returned by elementSelector.

Parameters

source
ParallelQuery<TSource>

The sequence to create a ILookup<TKey,TElement> from.

keySelector
Func<TSource,TKey>

A function to extract a key from each element.

elementSelector
Func<TSource,TElement>

A transform function to produce a result element value from each element.

Returns

A ILookup<TKey,TElement> that contains values of type TElement selected from the input sequence.

Exceptions

source or keySelector or elementSelector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

See also

Applies to

ToLookup<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Creates an ILookup<TKey,TElement> from a ParallelQuery<TSource> according to a specified key selector function and key comparer.

public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ILookup<TKey, TSource> ^ ToLookup(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Linq.ILookup<TKey,TSource> ToLookup<TSource,TKey> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
public static System.Linq.ILookup<TKey,TSource> ToLookup<TSource,TKey> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
static member ToLookup : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Linq.ILookup<'Key, 'Source>
<Extension()>
Public Function ToLookup(Of TSource, TKey) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey), comparer As IEqualityComparer(Of TKey)) As ILookup(Of TKey, TSource)

Type Parameters

TSource

The type of elements of source.

TKey

The type of the key returned by keySelector.

Parameters

source
ParallelQuery<TSource>

The sequence to create a ILookup<TKey,TElement> from.

keySelector
Func<TSource,TKey>

A function to extract a key from each element.

comparer
IEqualityComparer<TKey>

An IEqualityComparer<T> to compare keys.

Returns

ILookup<TKey,TSource>

A ILookup<TKey,TElement> that contains keys and values.

Exceptions

source or keySelector or is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

See also

Applies to

ToLookup<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Creates an ILookup<TKey,TElement> from a ParallelQuery<TSource> according to a specified key selector function.

public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ILookup<TKey, TSource> ^ ToLookup(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector);
public static System.Linq.ILookup<TKey,TSource> ToLookup<TSource,TKey> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector);
static member ToLookup : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> -> System.Linq.ILookup<'Key, 'Source>
<Extension()>
Public Function ToLookup(Of TSource, TKey) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey)) As ILookup(Of TKey, TSource)

Type Parameters

TSource

The type of elements of source.

TKey

The type of the key returned by keySelector.

Parameters

source
ParallelQuery<TSource>

The sequence to create a ILookup<TKey,TElement> from.

keySelector
Func<TSource,TKey>

A function to extract a key from each element.

Returns

ILookup<TKey,TSource>

A ILookup<TKey,TElement> that contains keys and values.

Exceptions

source or keySelector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

See also

Applies to