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.

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

Tworzy niezmienny słownik z bieżącej zawartości słownika konstruktora.

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

Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik jego zawartości przy użyciu określonego modułu porównywania kluczy.

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

Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik jego zawartości przy użyciu określonych porównań kluczy i wartości.

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

Wylicza i przekształca sekwencję i tworzy niezmienny słownik jego zawartości.

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

Wylicza i przekształca sekwencję i tworzy niezmienny słownik jego zawartości przy użyciu określonego modułu porównywania kluczy.

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

Wylicza i przekształca sekwencję i tworzy niezmienny słownik jego zawartości przy użyciu określonych porównań kluczy i wartości.

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

Tworzy niezmienny słownik z istniejącej kolekcji elementów, stosując funkcję przekształcania do kluczy źródłowych.

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

Tworzy niezmienny słownik na podstawie pewnej transformacji sekwencji.

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

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

Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik jego zawartości.

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 kluczy w słowniku.

TValue

Typ wartości w słowniku.

Parametry

source
IEnumerable<KeyValuePair<TKey,TValue>>

Sekwencja par klucz/wartość do wyliczenia.

Zwraca

Niezmienny słownik zawierający pary klucz/wartość w określonej sekwencji.

Dotyczy

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

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

Tworzy niezmienny słownik z bieżącej zawartości słownika konstruktora.

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.

TValue

Typ wartości w słowniku.

Parametry

builder
ImmutableDictionary<TKey,TValue>.Builder

Konstruktor do utworzenia niezmiennego słownika.

Zwraca

Niezmienny słownik zawierający bieżącą zawartość w słowniku konstruktora.

Dotyczy

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

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

Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik jego zawartości przy użyciu określonego modułu porównywania kluczy.

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.

TValue

Typ wartości w słowniku.

Parametry

source
IEnumerable<KeyValuePair<TKey,TValue>>

Sekwencja par klucz/wartość do wyliczenia.

keyComparer
IEqualityComparer<TKey>

Moduł porównywania kluczy używany podczas kompilowania niezmiennego słownika.

Zwraca

Niezmienny słownik zawierający pary klucz/wartość w określonej sekwencji.

Dotyczy

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

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

Wylicza sekwencję par klucz/wartość i tworzy niezmienny słownik jego zawartości przy użyciu określonych porównań kluczy i wartości.

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.

TValue

Typ wartości w słowniku.

Parametry

source
IEnumerable<KeyValuePair<TKey,TValue>>

Sekwencja par klucz/wartość do wyliczenia.

keyComparer
IEqualityComparer<TKey>

Moduł porównywania kluczy używany podczas kompilowania niezmiennego słownika.

valueComparer
IEqualityComparer<TValue>

Porównanie wartości do użycia w słowniku niezmiennym.

Zwraca

Niezmienny słownik zawierający pary klucz/wartość w określonej sekwencji.

Dotyczy

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

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

Wylicza i przekształca sekwencję i tworzy niezmienny słownik jego zawartości.

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.

TKey

Typ kluczy w wynikowym słowniku.

TValue

Typ wartości w wynikowym słowniku.

Parametry

source
IEnumerable<TSource>

Sekwencja do wyliczenia w celu wygenerowania słownika.

keySelector
Func<TSource,TKey>

Funkcja, która będzie generować klucz dla słownika z każdego elementu sekwencji.

elementSelector
Func<TSource,TValue>

Funkcja, która będzie generować wartość słownika z każdego elementu sekwencji.

Zwraca

Niezmienny słownik zawierający elementy w określonej sekwencji.

Dotyczy

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

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

Wylicza i przekształca sekwencję i tworzy niezmienny słownik jego zawartości przy użyciu określonego modułu porównywania kluczy.

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.

TKey

Typ kluczy w wynikowym słowniku.

TValue

Typ wartości w wynikowym słowniku.

Parametry

source
IEnumerable<TSource>

Sekwencja do wyliczenia w celu wygenerowania słownika.

keySelector
Func<TSource,TKey>

Funkcja, która będzie generować klucz dla słownika z każdego elementu sekwencji.

elementSelector
Func<TSource,TValue>

Funkcja, która będzie generować wartość słownika z każdego elementu sekwencji.

keyComparer
IEqualityComparer<TKey>

Moduł porównujący klucz do użycia w słowniku.

Zwraca

Niezmienny słownik zawierający elementy w określonej sekwencji.

Dotyczy

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

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

Wylicza i przekształca sekwencję i tworzy niezmienny słownik jego zawartości przy użyciu określonych porównań kluczy i wartości.

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.

TKey

Typ kluczy w wynikowym słowniku.

TValue

Typ wartości w wynikowym słowniku.

Parametry

source
IEnumerable<TSource>

Sekwencja do wyliczenia w celu wygenerowania słownika.

keySelector
Func<TSource,TKey>

Funkcja, która będzie generować klucz dla słownika z każdego elementu sekwencji.

elementSelector
Func<TSource,TValue>

Funkcja, która będzie generować wartość słownika z każdego elementu sekwencji.

keyComparer
IEqualityComparer<TKey>

Moduł porównujący klucz do użycia w słowniku.

valueComparer
IEqualityComparer<TValue>

Porównanie wartości do użycia w słowniku.

Zwraca

Niezmienny słownik zawierający elementy w określonej sekwencji.

Dotyczy

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

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

Tworzy niezmienny słownik z istniejącej kolekcji elementów, stosując funkcję przekształcania do kluczy źródłowych.

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.

TKey

Typ klucza w wynikowym słowniku niezmiennym.

Parametry

source
IEnumerable<TSource>

Kolekcja źródłowa używana do generowania niezmiennego słownika.

keySelector
Func<TSource,TKey>

Funkcja używana do przekształcania kluczy dla niezmiennego słownika.

Zwraca

ImmutableDictionary<TKey,TSource>

Niezmienny słownik zawierający elementy z sourceklasy , z kluczami przekształconymi przez zastosowanie metody keySelector.

Dotyczy

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

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

Tworzy niezmienny słownik na podstawie pewnej transformacji sekwencji.

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.

TKey

Typ klucza w wynikowym słowniku niezmiennym.

Parametry

source
IEnumerable<TSource>

Kolekcja źródłowa używana do generowania niezmiennego słownika.

keySelector
Func<TSource,TKey>

Funkcja używana do przekształcania kluczy dla niezmiennego słownika.

keyComparer
IEqualityComparer<TKey>

Moduł porównujący klucz do użycia w słowniku.

Zwraca

ImmutableDictionary<TKey,TSource>

Niezmienny słownik zawierający elementy z sourceklasy , z kluczami przekształconymi przez zastosowanie metody keySelector.

Dotyczy