ImmutableSortedDictionary.ToImmutableSortedDictionary 方法

定义

重载

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

枚举键/值对的序列,并生成其内容的不可变排序字典。

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

从生成器字典的当前内容创建不可变排序字典。

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

枚举键/值对的序列,并使用指定的键比较器生成其内容的不可变字典。

ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>, IEqualityComparer<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>, IComparer<TKey>)

枚举并转换序列,然后使用指定的键比较器生成其内容的不可变排序字典。

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

枚举并转换序列,然后使用指定的键和值比较器生成其内容的不可变排序字典。

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

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

枚举键/值对的序列,并生成其内容的不可变排序字典。

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

字典中的键的类型。

TValue

字典中的值的类型。

参数

source
IEnumerable<KeyValuePair<TKey,TValue>>

要枚举的键/值对的序列。

返回

一个不可变排序字典,其中包含指定序列中的键/值对。

适用于

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

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

从生成器字典的当前内容创建不可变排序字典。

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>
<Extension()>
Public Function ToImmutableSortedDictionary(Of TKey, TValue) (builder As ImmutableSortedDictionary(Of TKey, TValue).Builder) As ImmutableSortedDictionary(Of TKey, TValue)

类型参数

TKey

字典中的键的类型。

TValue

字典中的值的类型。

参数

builder
ImmutableSortedDictionary<TKey,TValue>.Builder

要从中创建不可变排序字典的生成器。

返回

包含生成器字典中当前内容的不可变排序字典。

适用于

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

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

枚举键/值对的序列,并使用指定的键比较器生成其内容的不可变字典。

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);
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

字典中的键的类型。

TValue

字典中的值的类型。

参数

source
IEnumerable<KeyValuePair<TKey,TValue>>

要枚举的键/值对的序列。

keyComparer
IComparer<TKey>

生成不可变字典时要使用的键比较器。

返回

一个不可变排序字典,其中包含指定序列中的键/值对。

适用于

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

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

枚举键/值对的序列,并使用指定的键和值比较器生成其内容的不可变排序字典。

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);
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

字典中的键的类型。

TValue

字典中的值的类型。

参数

source
IEnumerable<KeyValuePair<TKey,TValue>>

要枚举的键/值对的序列。

keyComparer
IComparer<TKey>

生成不可变字典时要使用的键比较器。

valueComparer
IEqualityComparer<TValue>

用于不可变字典的值比较器。

返回

一个不可变排序字典,其中包含指定序列中的键/值对。

适用于

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

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

枚举并转换序列,然后生成其内容的不可变排序字典。

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

序列中元素的类型。

TKey

生成的字典中键的类型。

TValue

生成的字典中值的类型。

参数

source
IEnumerable<TSource>

为生成字典而要枚举的序列。

keySelector
Func<TSource,TKey>

用于从每个序列元素生成字典键的函数。

elementSelector
Func<TSource,TValue>

用于从每个序列元素生成字典值的函数。

返回

一个不可变排序字典,其中包含指定序列中的项。

适用于

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

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

枚举并转换序列,然后使用指定的键比较器生成其内容的不可变排序字典。

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);
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

序列中元素的类型。

TKey

生成的字典中键的类型。

TValue

生成的字典中值的类型。

参数

source
IEnumerable<TSource>

为生成字典而要枚举的序列。

keySelector
Func<TSource,TKey>

用于从每个序列元素生成字典键的函数。

elementSelector
Func<TSource,TValue>

用于从每个序列元素生成字典值的函数。

keyComparer
IComparer<TKey>

用于字典的键比较器。

返回

一个不可变字典,其中包含指定序列中的项。

适用于

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

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

枚举并转换序列,然后使用指定的键和值比较器生成其内容的不可变排序字典。

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);
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

序列中元素的类型。

TKey

生成的字典中键的类型。

TValue

生成的字典中值的类型。

参数

source
IEnumerable<TSource>

为生成字典而要枚举的序列。

keySelector
Func<TSource,TKey>

用于从每个序列元素生成字典键的函数。

elementSelector
Func<TSource,TValue>

用于从每个序列元素生成字典值的函数。

keyComparer
IComparer<TKey>

用于字典的键比较器。

valueComparer
IEqualityComparer<TValue>

用于字典的值比较器。

返回

一个不可变排序字典,其中包含指定序列中的项。

适用于