ImmutableDictionary.ToImmutableDictionary Metoda
Definicja
Przeciążenia
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>) |
Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik jego zawartości.Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents. |
ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>.Builder) |
Tworzy niezmienny słownik z bieżącej zawartości słownika konstruktora.Creates an immutable dictionary from the current contents of the builder's dictionary. |
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) |
Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik swojej zawartości przy użyciu określonej funkcji porównującej klucza.Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer. |
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) |
Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik zawartości przy użyciu określonych funkcji porównujących klucza i wartości.Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key and value comparers. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) |
Wylicza i przekształca sekwencję i tworzy niezmienny słownik jej zawartości.Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) |
Wylicza i przekształca sekwencję oraz tworzy niezmienny słownik swojej zawartości przy użyciu określonej funkcji porównującej klucza.Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) |
Wylicza i przekształca sekwencję oraz tworzy niezmienny słownik zawartości przy użyciu określonych funkcji porównujących klucza i wartości.Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. |
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
Konstruuje niezmienny słownik z istniejącej kolekcji elementów, stosując funkcję transformacji do kluczy źródłowych.Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. |
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
Tworzy niezmienny słownik na podstawie pewnego przekształcenia sekwencji.Constructs an immutable dictionary based on some transformation of a sequence. |
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)
Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik jego zawartości.Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents.
public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ ToImmutableDictionary(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ source);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> source);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>? source);
static member ToImmutableDictionary : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableDictionary(Of TKey, TValue) (source As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As ImmutableDictionary(Of TKey, TValue)
Parametry typu
- TKey
Typ kluczy w słowniku.The type of the keys in the dictionary.
- TValue
Typ wartości w słowniku.The type of the values in the dictionary.
Parametry
- source
- IEnumerable<KeyValuePair<TKey,TValue>>
Sekwencja par klucz-wartość do wyliczenia.The sequence of key/value pairs to enumerate.
Zwraca
Niezmienny słownik zawierający pary klucz/wartość w określonej sekwencji.An immutable dictionary that contains the key/value pairs in the specified sequence.
Dotyczy
ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>.Builder)
Tworzy niezmienny słownik z bieżącej zawartości słownika konstruktora.Creates an immutable dictionary from the current contents of the builder's dictionary.
public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ ToImmutableDictionary(System::Collections::Immutable::ImmutableDictionary<TKey, TValue>::Builder ^ builder);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TKey,TValue> (this System.Collections.Immutable.ImmutableDictionary<TKey,TValue>.Builder builder);
static member ToImmutableDictionary : System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>.Builder -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableDictionary(Of TKey, TValue) (builder As ImmutableDictionary(Of TKey, TValue).Builder) As ImmutableDictionary(Of TKey, TValue)
Parametry typu
- TKey
Typ kluczy w słowniku.The type of the keys in the dictionary.
- TValue
Typ wartości w słowniku.The type of the values in the dictionary.
Parametry
Konstruktor, z którego ma zostać utworzony niezmienny słownik.The builder to create the immutable dictionary from.
Zwraca
Niezmienny słownik zawierający bieżącą zawartość w słowniku konstruktora.An immutable dictionary that contains the current contents in the builder's dictionary.
Dotyczy
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>)
Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik swojej zawartości przy użyciu określonej funkcji porównującej klucza.Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer.
public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ ToImmutableDictionary(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ source, System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> source, System.Collections.Generic.IEqualityComparer<TKey> keyComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>? source, System.Collections.Generic.IEqualityComparer<TKey>? keyComparer);
static member ToImmutableDictionary : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableDictionary(Of TKey, TValue) (source As IEnumerable(Of KeyValuePair(Of TKey, TValue)), keyComparer As IEqualityComparer(Of TKey)) As ImmutableDictionary(Of TKey, TValue)
Parametry typu
- TKey
Typ kluczy w słowniku.The type of the keys in the dictionary.
- TValue
Typ wartości w słowniku.The type of the values in the dictionary.
Parametry
- source
- IEnumerable<KeyValuePair<TKey,TValue>>
Sekwencja par klucz-wartość do wyliczenia.The sequence of key/value pairs to enumerate.
- keyComparer
- IEqualityComparer<TKey>
Funkcja porównująca klucz, która ma być używana podczas kompilowania niezmiennego słownika.The key comparer to use when building the immutable dictionary.
Zwraca
Niezmienny słownik zawierający pary klucz/wartość w określonej sekwencji.An immutable dictionary that contains the key/value pairs in the specified sequence.
Dotyczy
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)
Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik zawartości przy użyciu określonych funkcji porównujących klucza i wartości.Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key and value comparers.
public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ ToImmutableDictionary(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ source, System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> source, System.Collections.Generic.IEqualityComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>? source, System.Collections.Generic.IEqualityComparer<TKey>? keyComparer, System.Collections.Generic.IEqualityComparer<TValue>? valueComparer);
static member ToImmutableDictionary : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> * System.Collections.Generic.IEqualityComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableDictionary(Of TKey, TValue) (source As IEnumerable(Of KeyValuePair(Of TKey, TValue)), keyComparer As IEqualityComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue)) As ImmutableDictionary(Of TKey, TValue)
Parametry typu
- TKey
Typ kluczy w słowniku.The type of the keys in the dictionary.
- TValue
Typ wartości w słowniku.The type of the values in the dictionary.
Parametry
- source
- IEnumerable<KeyValuePair<TKey,TValue>>
Sekwencja par klucz-wartość do wyliczenia.The sequence of key/value pairs to enumerate.
- keyComparer
- IEqualityComparer<TKey>
Funkcja porównująca klucz, która ma być używana podczas kompilowania niezmiennego słownika.The key comparer to use when building the immutable dictionary.
- valueComparer
- IEqualityComparer<TValue>
Moduł porównujący wartości, który ma być używany dla niezmiennego słownika.The value comparer to use for the immutable dictionary.
Zwraca
Niezmienny słownik zawierający pary klucz/wartość w określonej sekwencji.An immutable dictionary that contains the key/value pairs in the specified sequence.
Dotyczy
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)
Wylicza i przekształca sekwencję i tworzy niezmienny słownik jej zawartości.Enumerates and transforms a sequence, and produces an immutable dictionary of its contents.
public:
generic <typename TSource, typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ ToImmutableDictionary(System::Collections::Generic::IEnumerable<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TValue> ^ elementSelector);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TSource,TKey,TValue> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TValue> elementSelector);
static member ToImmutableDictionary : seq<'Source> * Func<'Source, 'Key> * Func<'Source, 'Value> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableDictionary(Of TSource, TKey, TValue) (source As IEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TValue)) As ImmutableDictionary(Of TKey, TValue)
Parametry typu
- TSource
Typ elementów w sekwencji.The type of the elements in the sequence.
- TKey
Typ kluczy w słowniku.The type of the keys in the resulting dictionary.
- TValue
Typ wartości w słowniku.The type of the values in the resulting dictionary.
Parametry
- source
- IEnumerable<TSource>
Sekwencja do wyliczenia w celu wygenerowania słownika.The sequence to enumerate to generate the dictionary.
- keySelector
- Func<TSource,TKey>
Funkcja, która będzie generować klucz dla słownika z każdego elementu sekwencji.The function that will produce the key for the dictionary from each sequence element.
- elementSelector
- Func<TSource,TValue>
Funkcja, która będzie generować wartość dla słownika z każdego elementu sekwencji.The function that will produce the value for the dictionary from each sequence element.
Zwraca
Niezmienny słownik zawierający elementy w określonej sekwencji.An immutable dictionary that contains the items in the specified sequence.
Dotyczy
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)
Wylicza i przekształca sekwencję oraz tworzy niezmienny słownik swojej zawartości przy użyciu określonej funkcji porównującej klucza.Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer.
public:
generic <typename TSource, typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ ToImmutableDictionary(System::Collections::Generic::IEnumerable<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TValue> ^ elementSelector, System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TSource,TKey,TValue> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TValue> elementSelector, System.Collections.Generic.IEqualityComparer<TKey> keyComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TSource,TKey,TValue> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TValue> elementSelector, System.Collections.Generic.IEqualityComparer<TKey>? keyComparer);
static member ToImmutableDictionary : seq<'Source> * Func<'Source, 'Key> * Func<'Source, 'Value> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableDictionary(Of TSource, TKey, TValue) (source As IEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TValue), keyComparer As IEqualityComparer(Of TKey)) As ImmutableDictionary(Of TKey, TValue)
Parametry typu
- TSource
Typ elementów w sekwencji.The type of the elements in the sequence.
- TKey
Typ kluczy w słowniku.The type of the keys in the resulting dictionary.
- TValue
Typ wartości w słowniku.The type of the values in the resulting dictionary.
Parametry
- source
- IEnumerable<TSource>
Sekwencja do wyliczenia w celu wygenerowania słownika.The sequence to enumerate to generate the dictionary.
- keySelector
- Func<TSource,TKey>
Funkcja, która będzie generować klucz dla słownika z każdego elementu sekwencji.The function that will produce the key for the dictionary from each sequence element.
- elementSelector
- Func<TSource,TValue>
Funkcja, która będzie generować wartość dla słownika z każdego elementu sekwencji.The function that will produce the value for the dictionary from each sequence element.
- keyComparer
- IEqualityComparer<TKey>
Kluczowy moduł porównujący, który ma być używany dla słownika.The key comparer to use for the dictionary.
Zwraca
Niezmienny słownik zawierający elementy w określonej sekwencji.An immutable dictionary that contains the items in the specified sequence.
Dotyczy
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)
Wylicza i przekształca sekwencję oraz tworzy niezmienny słownik zawartości przy użyciu określonych funkcji porównujących klucza i wartości.Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers.
public:
generic <typename TSource, typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ ToImmutableDictionary(System::Collections::Generic::IEnumerable<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TValue> ^ elementSelector, System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TSource,TKey,TValue> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TValue> elementSelector, System.Collections.Generic.IEqualityComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> ToImmutableDictionary<TSource,TKey,TValue> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TValue> elementSelector, System.Collections.Generic.IEqualityComparer<TKey>? keyComparer, System.Collections.Generic.IEqualityComparer<TValue>? valueComparer);
static member ToImmutableDictionary : seq<'Source> * Func<'Source, 'Key> * Func<'Source, 'Value> * System.Collections.Generic.IEqualityComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableDictionary(Of TSource, TKey, TValue) (source As IEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TValue), keyComparer As IEqualityComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue)) As ImmutableDictionary(Of TKey, TValue)
Parametry typu
- TSource
Typ elementów w sekwencji.The type of the elements in the sequence.
- TKey
Typ kluczy w słowniku.The type of the keys in the resulting dictionary.
- TValue
Typ wartości w słowniku.The type of the values in the resulting dictionary.
Parametry
- source
- IEnumerable<TSource>
Sekwencja do wyliczenia w celu wygenerowania słownika.The sequence to enumerate to generate the dictionary.
- keySelector
- Func<TSource,TKey>
Funkcja, która będzie generować klucz dla słownika z każdego elementu sekwencji.The function that will produce the key for the dictionary from each sequence element.
- elementSelector
- Func<TSource,TValue>
Funkcja, która będzie generować wartość dla słownika z każdego elementu sekwencji.The function that will produce the value for the dictionary from each sequence element.
- keyComparer
- IEqualityComparer<TKey>
Kluczowy moduł porównujący, który ma być używany dla słownika.The key comparer to use for the dictionary.
- valueComparer
- IEqualityComparer<TValue>
Moduł porównujący wartości, który ma być używany dla słownika.The value comparer to use for the dictionary.
Zwraca
Niezmienny słownik zawierający elementy w określonej sekwencji.An immutable dictionary that contains the items in the specified sequence.
Dotyczy
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)
Konstruuje niezmienny słownik z istniejącej kolekcji elementów, stosując funkcję transformacji do kluczy źródłowych.Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys.
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TSource> ^ ToImmutableDictionary(System::Collections::Generic::IEnumerable<TSource> ^ source, Func<TSource, TKey> ^ keySelector);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TSource> ToImmutableDictionary<TSource,TKey> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector);
static member ToImmutableDictionary : seq<'Source> * Func<'Source, 'Key> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Source>
<Extension()>
Public Function ToImmutableDictionary(Of TSource, TKey) (source As IEnumerable(Of TSource), keySelector As Func(Of TSource, TKey)) As ImmutableDictionary(Of TKey, TSource)
Parametry typu
- TSource
Typ elementu w kolekcji źródłowej.The type of element in the source collection.
- TKey
Typ klucza w powstającym niezmiennym słowniku.The type of key in the resulting immutable dictionary.
Parametry
- source
- IEnumerable<TSource>
Kolekcja źródłowa używana do generowania niezmiennego słownika.The source collection used to generate the immutable dictionary.
- keySelector
- Func<TSource,TKey>
Funkcja używana do przekształcania kluczy dla niezmiennego słownika.The function used to transform keys for the immutable dictionary.
Zwraca
- ImmutableDictionary<TKey,TSource>
Niezmienny słownik zawierający elementy z source
, z kluczami przekształconymi przez zastosowanie keySelector
.The immutable dictionary that contains elements from source
, with keys transformed by applying keySelector
.
Dotyczy
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)
Tworzy niezmienny słownik na podstawie pewnego przekształcenia sekwencji.Constructs an immutable dictionary based on some transformation of a sequence.
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableDictionary<TKey, TSource> ^ ToImmutableDictionary(System::Collections::Generic::IEnumerable<TSource> ^ source, Func<TSource, TKey> ^ keySelector, System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TSource> ToImmutableDictionary<TSource,TKey> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey> keyComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TSource> ToImmutableDictionary<TSource,TKey> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? keyComparer);
static member ToImmutableDictionary : seq<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Source>
<Extension()>
Public Function ToImmutableDictionary(Of TSource, TKey) (source As IEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), keyComparer As IEqualityComparer(Of TKey)) As ImmutableDictionary(Of TKey, TSource)
Parametry typu
- TSource
Typ elementu w kolekcji źródłowej.The type of element in the source collection.
- TKey
Typ klucza w powstającym niezmiennym słowniku.The type of key in the resulting immutable dictionary.
Parametry
- source
- IEnumerable<TSource>
Kolekcja źródłowa używana do generowania niezmiennego słownika.The source collection used to generate the immutable dictionary.
- keySelector
- Func<TSource,TKey>
Funkcja używana do przekształcania kluczy dla niezmiennego słownika.The function used to transform keys for the immutable dictionary.
- keyComparer
- IEqualityComparer<TKey>
Kluczowy moduł porównujący, który ma być używany dla słownika.The key comparer to use for the dictionary.
Zwraca
- ImmutableDictionary<TKey,TSource>
Niezmienny słownik zawierający elementy z source
, z kluczami przekształconymi przez zastosowanie keySelector
.The immutable dictionary that contains elements from source
, with keys transformed by applying keySelector
.