ImmutableSortedDictionary.ToImmutableSortedDictionary 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)
列舉索引鍵/值組的序列,並產生不可變的排序字典作為內容。
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)
從產生器字典目前內容建立不可變的已排序字典。
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
字典中的值類型。
參數
產生器,用於建立不可變的已排序字典。
傳回
不可變的已排序字典,其中包含產生器字典的目前內容。
適用於
ToImmutableSortedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IComparer<TKey>)
列舉索引鍵/值組的序列,並使用指定的索引鍵比較子產生不可變的排序字典作為內容。
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>)
列舉索引鍵/值組的序列,並使用指定的索引鍵與值比較子產生不可變的排序字典作為內容。
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>)
列舉及轉換序列,並產生不可變的排序字典作為內容。
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>)
列舉及轉換序列,並使用指定的索引鍵比較子產生不可變的排序字典作為內容。
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>)
列舉及轉換序列,並使用指定的索引鍵與值比較子產生不可變的排序字典作為內容。
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>
字典使用的值比較子。
傳回
不可變的排序字典,其中包含指定序列的項目。