ImmutableDictionary.ToImmutableDictionary ImmutableDictionary.ToImmutableDictionary ImmutableDictionary.ToImmutableDictionary ImmutableDictionary.ToImmutableDictionary Method

Definizione

Overload

ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)

Enumera una sequenza di coppie chiave/valore e produce un dizionario non modificabile del relativo contenuto.Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents.

ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>) ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>) ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>)
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>)

Enumera una sequenza di coppie chiave/valore e produce un dizionario non modificabile del relativo contenuto usando l'operatore di confronto della chiave specificato.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>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Enumera una sequenza di coppie chiave/valore e produce un dizionario non modificabile del relativo contenuto usando gli operatori di confronto della chiave e del valore specificati.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>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

Enumera e trasforma una sequenza e produce un dizionario non modificabile del relativo contenuto.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>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)

Enumera e trasforma una sequenza e produce un dizionario non modificabile del relativo contenuto usando l'operatore di confronto della chiave specificato.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>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Enumera e trasforma una sequenza e produce un dizionario non modificabile del relativo contenuto usando gli operatori di confronto della chiave e del valore specificati.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>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Costruisce un dizionario non modificabile da una raccolta di elementi esistente, applicando una funzione di trasformazione alle chiavi di origine.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>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Costruisce un dizionario non modificabile basato su una trasformazione di una sequenza.Constructs an immutable dictionary based on some transformation of a sequence.

ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)

Enumera una sequenza di coppie chiave/valore e produce un dizionario non modificabile del relativo contenuto.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);
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)

Parametri di tipo

TKey

Tipo di chiavi nel dizionario.The type of the keys in the dictionary.

TValue

Tipo di valori nel dizionario.The type of the values in the dictionary.

Parametri

source
IEnumerable<KeyValuePair<TKey,TValue>>

Sequenza di coppie chiave/valore da enumerare.The sequence of key/value pairs to enumerate.

Restituisce

Dizionario non modificabile che contiene le coppie chiave/valore nella sequenza specificata.An immutable dictionary that contains the key/value pairs in the specified sequence.

ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>) ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>) ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>)

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>

Parametri di tipo

TKey
TValue

Parametri

builder
ImmutableDictionary<TKey,TValue>.Builder

Restituisce

ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>)

Enumera una sequenza di coppie chiave/valore e produce un dizionario non modificabile del relativo contenuto usando l'operatore di confronto della chiave specificato.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);
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)

Parametri di tipo

TKey

Tipo di chiavi nel dizionario.The type of the keys in the dictionary.

TValue

Tipo di valori nel dizionario.The type of the values in the dictionary.

Parametri

source
IEnumerable<KeyValuePair<TKey,TValue>>

Sequenza di coppie chiave/valore da enumerare.The sequence of key/value pairs to enumerate.

keyComparer
IEqualityComparer<TKey>

Operatore di confronto della chiave da usare durante la compilazione del dizionario non modificabile.The key comparer to use when building the immutable dictionary.

Restituisce

Dizionario non modificabile che contiene le coppie chiave/valore nella sequenza specificata.An immutable dictionary that contains the key/value pairs in the specified sequence.

ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Enumera una sequenza di coppie chiave/valore e produce un dizionario non modificabile del relativo contenuto usando gli operatori di confronto della chiave e del valore specificati.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);
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)

Parametri di tipo

TKey

Tipo di chiavi nel dizionario.The type of the keys in the dictionary.

TValue

Tipo di valori nel dizionario.The type of the values in the dictionary.

Parametri

source
IEnumerable<KeyValuePair<TKey,TValue>>

Sequenza di coppie chiave/valore da enumerare.The sequence of key/value pairs to enumerate.

keyComparer
IEqualityComparer<TKey>

Operatore di confronto della chiave da usare durante la compilazione del dizionario non modificabile.The key comparer to use when building the immutable dictionary.

valueComparer
IEqualityComparer<TValue>

Operatore di confronto del valore da usare per il dizionario non modificabile.The value comparer to use for the immutable dictionary.

Restituisce

Dizionario non modificabile che contiene le coppie chiave/valore nella sequenza specificata.An immutable dictionary that contains the key/value pairs in the specified sequence.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

Enumera e trasforma una sequenza e produce un dizionario non modificabile del relativo contenuto.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)

Parametri di tipo

TSource

Tipo degli elementi nella sequenza.The type of the elements in the sequence.

TKey

Tipo di chiavi nel dizionario risultante.The type of the keys in the resulting dictionary.

TValue

Tipo di valori nel dizionario risultante.The type of the values in the resulting dictionary.

Parametri

source
IEnumerable<TSource>

Sequenza da enumerare per generare il dizionario.The sequence to enumerate to generate the dictionary.

keySelector
Func<TSource,TKey>

Funzione che produrrà la chiave per il dizionario da ogni elemento della sequenza.The function that will produce the key for the dictionary from each sequence element.

elementSelector
Func<TSource,TValue>

Funzione che produrrà il valore per il dizionario da ogni elemento della sequenza.The function that will produce the value for the dictionary from each sequence element.

Restituisce

Dizionario non modificabile che contiene gli elementi nella sequenza specificata.An immutable dictionary that contains the items in the specified sequence.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)

Enumera e trasforma una sequenza e produce un dizionario non modificabile del relativo contenuto usando l'operatore di confronto della chiave specificato.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);
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)

Parametri di tipo

TSource

Tipo degli elementi nella sequenza.The type of the elements in the sequence.

TKey

Tipo di chiavi nel dizionario risultante.The type of the keys in the resulting dictionary.

TValue

Tipo di valori nel dizionario risultante.The type of the values in the resulting dictionary.

Parametri

source
IEnumerable<TSource>

Sequenza da enumerare per generare il dizionario.The sequence to enumerate to generate the dictionary.

keySelector
Func<TSource,TKey>

Funzione che produrrà la chiave per il dizionario da ogni elemento della sequenza.The function that will produce the key for the dictionary from each sequence element.

elementSelector
Func<TSource,TValue>

Funzione che produrrà il valore per il dizionario da ogni elemento della sequenza.The function that will produce the value for the dictionary from each sequence element.

keyComparer
IEqualityComparer<TKey>

Operatore di confronto della chiave da usare per il dizionario.The key comparer to use for the dictionary.

Restituisce

Dizionario non modificabile che contiene gli elementi nella sequenza specificata.An immutable dictionary that contains the items in the specified sequence.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Enumera e trasforma una sequenza e produce un dizionario non modificabile del relativo contenuto usando gli operatori di confronto della chiave e del valore specificati.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);
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)

Parametri di tipo

TSource

Tipo degli elementi nella sequenza.The type of the elements in the sequence.

TKey

Tipo di chiavi nel dizionario risultante.The type of the keys in the resulting dictionary.

TValue

Tipo di valori nel dizionario risultante.The type of the values in the resulting dictionary.

Parametri

source
IEnumerable<TSource>

Sequenza da enumerare per generare il dizionario.The sequence to enumerate to generate the dictionary.

keySelector
Func<TSource,TKey>

Funzione che produrrà la chiave per il dizionario da ogni elemento della sequenza.The function that will produce the key for the dictionary from each sequence element.

elementSelector
Func<TSource,TValue>

Funzione che produrrà il valore per il dizionario da ogni elemento della sequenza.The function that will produce the value for the dictionary from each sequence element.

keyComparer
IEqualityComparer<TKey>

Operatore di confronto della chiave da usare per il dizionario.The key comparer to use for the dictionary.

valueComparer
IEqualityComparer<TValue>

Operatore di confronto del valore da usare per il dizionario.The value comparer to use for the dictionary.

Restituisce

Dizionario non modificabile che contiene gli elementi nella sequenza specificata.An immutable dictionary that contains the items in the specified sequence.

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Costruisce un dizionario non modificabile da una raccolta di elementi esistente, applicando una funzione di trasformazione alle chiavi di origine.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)

Parametri di tipo

TSource

Tipo di elemento nella raccolta di origine.The type of element in the source collection.

TKey

Tipo di chiave nel dizionario non modificabile risultante.The type of key in the resulting immutable dictionary.

Parametri

source
IEnumerable<TSource>

Raccolta di origine usata per generare il dizionario non modificabile.The source collection used to generate the immutable dictionary.

keySelector
Func<TSource,TKey>

Funzione usata per trasformare le chiavi per il dizionario non modificabile.The function used to transform keys for the immutable dictionary.

Restituisce

ImmutableDictionary<TKey,TSource>

Dizionario non modificabile che contiene gli elementi da source, con le chiavi trasformate applicando keySelector.The immutable dictionary that contains elements from source, with keys transformed by applying keySelector.

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Costruisce un dizionario non modificabile basato su una trasformazione di una sequenza.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);
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)

Parametri di tipo

TSource

Tipo di elemento nella raccolta di origine.The type of element in the source collection.

TKey

Tipo di chiave nel dizionario non modificabile risultante.The type of key in the resulting immutable dictionary.

Parametri

source
IEnumerable<TSource>

Raccolta di origine usata per generare il dizionario non modificabile.The source collection used to generate the immutable dictionary.

keySelector
Func<TSource,TKey>

Funzione usata per trasformare le chiavi per il dizionario non modificabile.The function used to transform keys for the immutable dictionary.

keyComparer
IEqualityComparer<TKey>

Operatore di confronto della chiave da usare per il dizionario.The key comparer to use for the dictionary.

Restituisce

ImmutableDictionary<TKey,TSource>

Dizionario non modificabile che contiene gli elementi da source, con le chiavi trasformate applicando keySelector.The immutable dictionary that contains elements from source, with keys transformed by applying keySelector.

Si applica a