ParallelEnumerable.ToDictionary Metoda

Definicja

Tworzy obiekt Dictionary<TKey,TValue> na podstawie elementu ParallelQuery<TSource>.

Przeciążenia

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

Tworzy obiekt Dictionary<TKey,TValue>ParallelQuery<TSource> na podstawie określonych funkcji selektora kluczy i selektora elementów.

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

Tworzy element Dictionary<TKey,TValue> na podstawie ParallelQuery<TSource> określonej funkcji selektora kluczy, modułu porównującego i funkcji selektora elementów.

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

Tworzy obiekt Dictionary<TKey,TValue> na podstawie ParallelQuery<TSource> określonej funkcji selektora kluczy.

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

Tworzy element Dictionary<TKey,TValue> na podstawie ParallelQuery<TSource> określonej funkcji selektora kluczy i modułu porównania kluczy.

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

Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs

Tworzy obiekt Dictionary<TKey,TValue>ParallelQuery<TSource> na podstawie określonych funkcji selektora kluczy i selektora elementów.

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

Parametry typu

TSource

Typ elementów elementu source.

TKey

Typ klucza zwróconego przez keySelector.

TElement

Typ wartości zwracanej przez elementSelector.

Parametry

source
ParallelQuery<TSource>

Sekwencja do utworzenia elementu Dictionary<TKey,TValue> na podstawie.

keySelector
Func<TSource,TKey>

Funkcja wyodrębniania klucza z każdego elementu.

elementSelector
Func<TSource,TElement>

Funkcja transformacji do uzyskiwania wartości wyniku elementu z każdego z elementu.

Zwraca

Dictionary<TKey,TElement>

Element Dictionary<TKey,TValue> zawierający wartości typu TElement wybrane z sekwencji danych wejściowych.

Wyjątki

Zapytanie zostało anulowane przy użyciu tokenu przekazanego za pośrednictwem WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken)elementu .

source lub keySelectorelementSelector jest odwołaniem o wartości null (Nic w Visual Basic).

keySelector tworzy klucz, który jest odwołaniem o wartości null (Nic w Visual Basic). -or - keySelector tworzy zduplikowane klucze dla dwóch elementów. —lub — wystąpił co najmniej jeden wyjątek podczas oceny zapytania.

Zobacz też

Dotyczy

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

Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs

Tworzy element Dictionary<TKey,TValue> na podstawie ParallelQuery<TSource> określonej funkcji selektora kluczy, modułu porównującego i funkcji selektora elementów.

public:
generic <typename TSource, typename TKey, typename TElement>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::Dictionary<TKey, TElement> ^ ToDictionary(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TElement> ^ elementSelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Collections.Generic.Dictionary<TKey,TElement> ToDictionary<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.Collections.Generic.Dictionary<TKey,TElement> ToDictionary<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 ToDictionary : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> * Func<'Source, 'Element> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.Dictionary<'Key, 'Element>
<Extension()>
Public Function ToDictionary(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 Dictionary(Of TKey, TElement)

Parametry typu

TSource

Typ elementów elementu source.

TKey

Typ klucza zwróconego przez keySelector.

TElement

Typ wartości zwracanej przez elementSelector.

Parametry

source
ParallelQuery<TSource>

Sekwencja do utworzenia elementu Dictionary<TKey,TValue> na podstawie.

keySelector
Func<TSource,TKey>

Funkcja wyodrębniania klucza z każdego elementu.

elementSelector
Func<TSource,TElement>

Funkcja transformacji do uzyskiwania wartości wyniku elementu z każdego z elementu.

comparer
IEqualityComparer<TKey>

Element IEqualityComparer<T> do porównywania kluczy.

Zwraca

Dictionary<TKey,TElement>

Element Dictionary<TKey,TValue> zawierający wartości typu TElement wybrane z sekwencji danych wejściowych.

Wyjątki

Zapytanie zostało anulowane przy użyciu tokenu przekazanego za pośrednictwem WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken)elementu .

source lub keySelectorelementSelector jest odwołaniem o wartości null (Nic w Visual Basic).

keySelector tworzy klucz, który jest odwołaniem o wartości null (Nic w Visual Basic). -or - keySelector tworzy zduplikowane klucze dla dwóch elementów. —lub — wystąpił co najmniej jeden wyjątek podczas oceny zapytania.

Zobacz też

Dotyczy

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

Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs

Tworzy obiekt Dictionary<TKey,TValue> na podstawie ParallelQuery<TSource> określonej funkcji selektora kluczy.

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

Parametry typu

TSource

Typ elementów elementu source.

TKey

Typ klucza zwróconego przez keySelector.

Parametry

source
ParallelQuery<TSource>

Sekwencja do utworzenia elementu Dictionary<TKey,TValue> na podstawie.

keySelector
Func<TSource,TKey>

Funkcja wyodrębniania klucza z każdego elementu.

Zwraca

Dictionary<TKey,TSource>

Obiekt Dictionary<TKey,TValue> zawierający klucze i wartości.

Wyjątki

Zapytanie zostało anulowane przy użyciu tokenu przekazanego za pośrednictwem WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken)elementu .

source lub keySelector jest odwołaniem o wartości null (Nic w Visual Basic).

keySelector tworzy klucz, który jest odwołaniem o wartości null (Nic w Visual Basic). -or - keySelector tworzy zduplikowane klucze dla dwóch elementów. —lub — wystąpił co najmniej jeden wyjątek podczas oceny zapytania.

Zobacz też

Dotyczy

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

Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs

Tworzy element Dictionary<TKey,TValue> na podstawie ParallelQuery<TSource> określonej funkcji selektora kluczy i modułu porównania kluczy.

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

Parametry typu

TSource

Typ elementów elementu source.

TKey

Typ klucza zwróconego przez keySelector.

Parametry

source
ParallelQuery<TSource>

Sekwencja do utworzenia elementu Dictionary<TKey,TValue> na podstawie.

keySelector
Func<TSource,TKey>

Funkcja wyodrębniania klucza z każdego elementu.

comparer
IEqualityComparer<TKey>

Element IEqualityComparer<T> do porównywania kluczy.

Zwraca

Dictionary<TKey,TSource>

Obiekt Dictionary<TKey,TValue> zawierający klucze i wartości.

Wyjątki

Zapytanie zostało anulowane przy użyciu tokenu przekazanego za pośrednictwem WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken)elementu .

source lub keySelector jest odwołaniem o wartości null (Nic w Visual Basic).

keySelector tworzy klucz, który jest odwołaniem o wartości null (Nic w Visual Basic). -or - keySelector tworzy zduplikowane klucze dla dwóch elementów. —lub — wystąpił co najmniej jeden wyjątek podczas oceny zapytania.

Zobacz też

Dotyczy