ImmutableSortedDictionary.ToImmutableSortedDictionary ImmutableSortedDictionary.ToImmutableSortedDictionary ImmutableSortedDictionary.ToImmutableSortedDictionary ImmutableSortedDictionary.ToImmutableSortedDictionary Method

定义

重载

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

枚举键/值对的序列,并生成其内容的不可变排序字典。Enumerates a sequence of key/value pairs and produces an immutable sorted dictionary of its contents.

ToImmutableSortedDictionary<TKey,TValue>(ImmutableSortedDictionary<TKey,TValue>) ToImmutableSortedDictionary<TKey,TValue>(ImmutableSortedDictionary<TKey,TValue>) ToImmutableSortedDictionary<TKey,TValue>(ImmutableSortedDictionary<TKey,TValue>)

从生成器字典的当前内容创建不可变排序字典。Creates an immutable sorted dictionary from the current contents of the builder's dictionary.

ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>)

枚举键/值对的序列,并使用指定的键比较器生成其内容的不可变字典。Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer.

ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<TValue>)

枚举键/值对的序列,并使用指定的键和值比较器生成其内容的不可变排序字典。Enumerates a sequence of key/value pairs and produces an immutable sorted dictionary of its contents by using the specified key and value comparers.

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

枚举并转换序列,然后生成其内容的不可变排序字典。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>)

枚举并转换序列,然后使用指定的键比较器生成其内容的不可变排序字典。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

枚举并转换序列,然后使用指定的键和值比较器生成其内容的不可变排序字典。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers.

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

枚举键/值对的序列,并生成其内容的不可变排序字典。Enumerates a sequence of key/value pairs and produces an immutable sorted dictionary of its contents.

public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ ToImmutableSortedDictionary(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ source);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> ToImmutableSortedDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> source);
static member ToImmutableSortedDictionary : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableSortedDictionary(Of TKey, TValue) (source As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As ImmutableSortedDictionary(Of TKey, TValue)

类型参数

TKey

字典中的键的类型。The type of the keys in the dictionary.

TValue

字典中的值的类型。The type of the values in the dictionary.

参数

source
IEnumerable<KeyValuePair<TKey,TValue>>

要枚举的键/值对的序列。The sequence of key/value pairs to enumerate.

返回

一个不可变排序字典,其中包含指定序列中的键/值对。An immutable sorted dictionary that contains the key/value pairs in the specified sequence.

ToImmutableSortedDictionary<TKey,TValue>(ImmutableSortedDictionary<TKey,TValue>) ToImmutableSortedDictionary<TKey,TValue>(ImmutableSortedDictionary<TKey,TValue>) ToImmutableSortedDictionary<TKey,TValue>(ImmutableSortedDictionary<TKey,TValue>)

从生成器字典的当前内容创建不可变排序字典。Creates an immutable sorted dictionary from the current contents of the builder's dictionary.

public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ ToImmutableSortedDictionary(System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue>::Builder ^ builder);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> ToImmutableSortedDictionary<TKey,TValue> (this System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>.Builder builder);
static member ToImmutableSortedDictionary : System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>.Builder -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>

类型参数

TKey

字典中的键的类型。The type of the keys in the dictionary.

TValue

字典中的值的类型。The type of the values in the dictionary.

参数

builder
ImmutableSortedDictionary<TKey,TValue>.Builder

要从中创建不可变排序字典的生成器。The builder to create the immutable sorted dictionary from.

返回

包含生成器字典中当前内容的不可变排序字典。An immutable sorted dictionary that contains the current contents in the builder's dictionary.

ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>)

枚举键/值对的序列,并使用指定的键比较器生成其内容的不可变字典。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::ImmutableSortedDictionary<TKey, TValue> ^ ToImmutableSortedDictionary(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ source, System::Collections::Generic::IComparer<TKey> ^ keyComparer);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> ToImmutableSortedDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> source, System.Collections.Generic.IComparer<TKey> keyComparer);
static member ToImmutableSortedDictionary : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> * System.Collections.Generic.IComparer<'Key> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableSortedDictionary(Of TKey, TValue) (source As IEnumerable(Of KeyValuePair(Of TKey, TValue)), keyComparer As IComparer(Of TKey)) As ImmutableSortedDictionary(Of TKey, TValue)

类型参数

TKey

字典中的键的类型。The type of the keys in the dictionary.

TValue

字典中的值的类型。The type of the values in the dictionary.

参数

source
IEnumerable<KeyValuePair<TKey,TValue>>

要枚举的键/值对的序列。The sequence of key/value pairs to enumerate.

keyComparer
IComparer<TKey>

生成不可变字典时要使用的键比较器。The key comparer to use when building the immutable dictionary.

返回

一个不可变排序字典,其中包含指定序列中的键/值对。An immutable sorted dictionary that contains the key/value pairs in the specified sequence.

ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<TValue>)

枚举键/值对的序列,并使用指定的键和值比较器生成其内容的不可变排序字典。Enumerates a sequence of key/value pairs and produces an immutable sorted 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::ImmutableSortedDictionary<TKey, TValue> ^ ToImmutableSortedDictionary(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ source, System::Collections::Generic::IComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> ToImmutableSortedDictionary<TKey,TValue> (this System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> source, System.Collections.Generic.IComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer);
static member ToImmutableSortedDictionary : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> * System.Collections.Generic.IComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableSortedDictionary(Of TKey, TValue) (source As IEnumerable(Of KeyValuePair(Of TKey, TValue)), keyComparer As IComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue)) As ImmutableSortedDictionary(Of TKey, TValue)

类型参数

TKey

字典中的键的类型。The type of the keys in the dictionary.

TValue

字典中的值的类型。The type of the values in the dictionary.

参数

source
IEnumerable<KeyValuePair<TKey,TValue>>

要枚举的键/值对的序列。The sequence of key/value pairs to enumerate.

keyComparer
IComparer<TKey>

生成不可变字典时要使用的键比较器。The key comparer to use when building the immutable dictionary.

valueComparer
IEqualityComparer<TValue>

用于不可变字典的值比较器。The value comparer to use for the immutable dictionary.

返回

一个不可变排序字典,其中包含指定序列中的键/值对。An immutable sorted dictionary that contains the key/value pairs in the specified sequence.

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

枚举并转换序列,然后生成其内容的不可变排序字典。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.

public:
generic <typename TSource, typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ ToImmutableSortedDictionary(System::Collections::Generic::IEnumerable<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TValue> ^ elementSelector);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> ToImmutableSortedDictionary<TSource,TKey,TValue> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TValue> elementSelector);
static member ToImmutableSortedDictionary : seq<'Source> * Func<'Source, 'Key> * Func<'Source, 'Value> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableSortedDictionary(Of TSource, TKey, TValue) (source As IEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TValue)) As ImmutableSortedDictionary(Of TKey, TValue)

类型参数

TSource

序列中元素的类型。The type of the elements in the sequence.

TKey

生成的字典中键的类型。The type of the keys in the resulting dictionary.

TValue

生成的字典中值的类型。The type of the values in the resulting dictionary.

参数

source
IEnumerable<TSource>

为生成字典而要枚举的序列。The sequence to enumerate to generate the dictionary.

keySelector
Func<TSource,TKey>

用于从每个序列元素生成字典键的函数。The function that will produce the key for the dictionary from each sequence element.

elementSelector
Func<TSource,TValue>

用于从每个序列元素生成字典值的函数。The function that will produce the value for the dictionary from each sequence element.

返回

一个不可变排序字典,其中包含指定序列中的项。An immutable sorted dictionary that contains the items in the specified sequence.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>)

枚举并转换序列,然后使用指定的键比较器生成其内容的不可变排序字典。Enumerates and transforms a sequence, and produces an immutable sorted 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::ImmutableSortedDictionary<TKey, TValue> ^ ToImmutableSortedDictionary(System::Collections::Generic::IEnumerable<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TValue> ^ elementSelector, System::Collections::Generic::IComparer<TKey> ^ keyComparer);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> ToImmutableSortedDictionary<TSource,TKey,TValue> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TValue> elementSelector, System.Collections.Generic.IComparer<TKey> keyComparer);
static member ToImmutableSortedDictionary : seq<'Source> * Func<'Source, 'Key> * Func<'Source, 'Value> * System.Collections.Generic.IComparer<'Key> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableSortedDictionary(Of TSource, TKey, TValue) (source As IEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TValue), keyComparer As IComparer(Of TKey)) As ImmutableSortedDictionary(Of TKey, TValue)

类型参数

TSource

序列中元素的类型。The type of the elements in the sequence.

TKey

生成的字典中键的类型。The type of the keys in the resulting dictionary.

TValue

生成的字典中值的类型。The type of the values in the resulting dictionary.

参数

source
IEnumerable<TSource>

为生成字典而要枚举的序列。The sequence to enumerate to generate the dictionary.

keySelector
Func<TSource,TKey>

用于从每个序列元素生成字典键的函数。The function that will produce the key for the dictionary from each sequence element.

elementSelector
Func<TSource,TValue>

用于从每个序列元素生成字典值的函数。The function that will produce the value for the dictionary from each sequence element.

keyComparer
IComparer<TKey>

用于字典的键比较器。The key comparer to use for the dictionary.

返回

一个不可变字典,其中包含指定序列中的项。An immutable dictionary that contains the items in the specified sequence.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>) ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

枚举并转换序列,然后使用指定的键和值比较器生成其内容的不可变排序字典。Enumerates and transforms a sequence, and produces an immutable sorted 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::ImmutableSortedDictionary<TKey, TValue> ^ ToImmutableSortedDictionary(System::Collections::Generic::IEnumerable<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TValue> ^ elementSelector, System::Collections::Generic::IComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> ToImmutableSortedDictionary<TSource,TKey,TValue> (this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TValue> elementSelector, System.Collections.Generic.IComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer);
static member ToImmutableSortedDictionary : seq<'Source> * Func<'Source, 'Key> * Func<'Source, 'Value> * System.Collections.Generic.IComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
<Extension()>
Public Function ToImmutableSortedDictionary(Of TSource, TKey, TValue) (source As IEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TValue), keyComparer As IComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue)) As ImmutableSortedDictionary(Of TKey, TValue)

类型参数

TSource

序列中元素的类型。The type of the elements in the sequence.

TKey

生成的字典中键的类型。The type of the keys in the resulting dictionary.

TValue

生成的字典中值的类型。The type of the values in the resulting dictionary.

参数

source
IEnumerable<TSource>

为生成字典而要枚举的序列。The sequence to enumerate to generate the dictionary.

keySelector
Func<TSource,TKey>

用于从每个序列元素生成字典键的函数。The function that will produce the key for the dictionary from each sequence element.

elementSelector
Func<TSource,TValue>

用于从每个序列元素生成字典值的函数。The function that will produce the value for the dictionary from each sequence element.

keyComparer
IComparer<TKey>

用于字典的键比较器。The key comparer to use for the dictionary.

valueComparer
IEqualityComparer<TValue>

用于字典的值比较器。The value comparer to use for the dictionary.

返回

一个不可变排序字典,其中包含指定序列中的项。An immutable sorted dictionary that contains the items in the specified sequence.

适用于