ImmutableDictionary.ToImmutableDictionary Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Přetížení
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)
Vytvoří výčet posloupnosti párů klíč/hodnota a vytvoří neměnný slovník jejího obsahu.
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)
Parametry typu
- TKey
Typ klíčů ve slovníku.
- TValue
Typ hodnot ve slovníku.
Parametry
- source
- IEnumerable<KeyValuePair<TKey,TValue>>
Posloupnost párů klíč/hodnota k výčtu.
Návraty
Neměnný slovník, který obsahuje páry klíč/hodnota v zadaném pořadí.
Platí pro
ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>.Builder)
Vytvoří neměnný slovník z aktuálního obsahu slovníku tvůrce.
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 klíčů ve slovníku.
- TValue
Typ hodnot ve slovníku.
Parametry
Tvůrce, ze které chcete vytvořit neměnný slovník.
Návraty
Neměnný slovník, který obsahuje aktuální obsah ve slovníku tvůrce.
Platí pro
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>)
Vytvoří výčet posloupnosti párů klíč/hodnota a vytvoří neměnný slovník jejího obsahu pomocí zadaného porovnávače klíčů.
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 klíčů ve slovníku.
- TValue
Typ hodnot ve slovníku.
Parametry
- source
- IEnumerable<KeyValuePair<TKey,TValue>>
Posloupnost párů klíč/hodnota k výčtu.
- keyComparer
- IEqualityComparer<TKey>
Porovnávače klíčů, které se mají použít při vytváření neměnného slovníku.
Návraty
Neměnný slovník, který obsahuje páry klíč/hodnota v zadaném pořadí.
Platí pro
ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)
Vytvoří výčet posloupnosti párů klíč/hodnota a vytvoří neměnný slovník jejího obsahu pomocí zadaných porovnávačů klíč a hodnota.
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 klíčů ve slovníku.
- TValue
Typ hodnot ve slovníku.
Parametry
- source
- IEnumerable<KeyValuePair<TKey,TValue>>
Posloupnost párů klíč/hodnota k výčtu.
- keyComparer
- IEqualityComparer<TKey>
Porovnávače klíčů, které se mají použít při vytváření neměnného slovníku.
- valueComparer
- IEqualityComparer<TValue>
Porovnávače hodnot, který se má použít pro neměnný slovník.
Návraty
Neměnný slovník, který obsahuje páry klíč/hodnota v zadaném pořadí.
Platí pro
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)
Vytvoří výčet a transformuje sekvenci a vytvoří neměnný slovník jejího obsahu.
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 prvků v sekvenci.
- TKey
Typ klíčů ve výsledném slovníku.
- TValue
Typ hodnot ve výsledném slovníku.
Parametry
- source
- IEnumerable<TSource>
Posloupnost výčtu pro vygenerování slovníku.
- keySelector
- Func<TSource,TKey>
Funkce, která vytvoří klíč slovníku z každého prvku sekvence.
- elementSelector
- Func<TSource,TValue>
Funkce, která vytvoří hodnotu slovníku z každého prvku sekvence.
Návraty
Neměnný slovník, který obsahuje položky v zadaném pořadí.
Platí pro
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)
Vytvoří výčet a transformuje sekvenci a vytvoří neměnný slovník jejího obsahu pomocí zadaného porovnávače klíčů.
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 prvků v sekvenci.
- TKey
Typ klíčů ve výsledném slovníku.
- TValue
Typ hodnot ve výsledném slovníku.
Parametry
- source
- IEnumerable<TSource>
Posloupnost výčtu pro vygenerování slovníku.
- keySelector
- Func<TSource,TKey>
Funkce, která vytvoří klíč slovníku z každého prvku sekvence.
- elementSelector
- Func<TSource,TValue>
Funkce, která vytvoří hodnotu slovníku z každého prvku sekvence.
- keyComparer
- IEqualityComparer<TKey>
Porovnávače klíčů, které se mají použít pro slovník.
Návraty
Neměnný slovník, který obsahuje položky v zadaném pořadí.
Platí pro
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)
Vytvoří výčet a transformuje sekvenci a vytvoří neměnný slovník jejího obsahu pomocí zadaných porovnávačů klíčů a hodnot.
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 prvků v sekvenci.
- TKey
Typ klíčů ve výsledném slovníku.
- TValue
Typ hodnot ve výsledném slovníku.
Parametry
- source
- IEnumerable<TSource>
Posloupnost výčtu pro vygenerování slovníku.
- keySelector
- Func<TSource,TKey>
Funkce, která vytvoří klíč slovníku z každého prvku sekvence.
- elementSelector
- Func<TSource,TValue>
Funkce, která vytvoří hodnotu slovníku z každého prvku sekvence.
- keyComparer
- IEqualityComparer<TKey>
Porovnávače klíčů, které se mají použít pro slovník.
- valueComparer
- IEqualityComparer<TValue>
Porovnávače hodnot, který se má použít pro slovník.
Návraty
Neměnný slovník, který obsahuje položky v zadaném pořadí.
Platí pro
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)
Vytvoří neměnný slovník z existující kolekce prvků a použije transformační funkci na zdrojové klíče.
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 ve zdrojové kolekci.
- TKey
Typ klíče ve výsledném neměnném slovníku.
Parametry
- source
- IEnumerable<TSource>
Zdrojová kolekce používaná ke generování neměnného slovníku.
- keySelector
- Func<TSource,TKey>
Funkce, která slouží k transformaci klíčů pro neměnný slovník.
Návraty
- ImmutableDictionary<TKey,TSource>
Neměnný slovník, který obsahuje elementy z source
, s klíči transformovanými keySelector
použitím .
Platí pro
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)
Vytvoří neměnný slovník na základě určité transformace sekvence.
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 ve zdrojové kolekci.
- TKey
Typ klíče ve výsledném neměnném slovníku.
Parametry
- source
- IEnumerable<TSource>
Zdrojová kolekce používaná ke generování neměnného slovníku.
- keySelector
- Func<TSource,TKey>
Funkce, která slouží k transformaci klíčů pro neměnný slovník.
- keyComparer
- IEqualityComparer<TKey>
Porovnávače klíčů, které se mají použít pro slovník.
Návraty
- ImmutableDictionary<TKey,TSource>
Neměnný slovník, který obsahuje elementy z source
, s klíči transformovanými keySelector
použitím .