ImmutableSortedDictionary 類別

定義

提供一組 ImmutableSortedDictionary<TKey,TValue> 類別執行個體的初始化方法。

NuGet 套件System.Collections.Immutable (關於固定集合及其安裝方法)

public ref class ImmutableSortedDictionary abstract sealed
public static class ImmutableSortedDictionary
type ImmutableSortedDictionary = class
Public Module ImmutableSortedDictionary
繼承
ImmutableSortedDictionary

方法

Create<TKey,TValue>()

建立空白、不可變的排序字典。

Create<TKey,TValue>(IComparer<TKey>)

建立空白、不可變的排序字典,該字典會使用指定的索引鍵比較子。

Create<TKey,TValue>(IComparer<TKey>, IEqualityComparer<TValue>)

建立空白、不可變的排序字典,該字典會使用指定的索引鍵與值比較子。

CreateBuilder<TKey,TValue>()

建立新的、不可變的排序字典產生器。

CreateBuilder<TKey,TValue>(IComparer<TKey>)

建立新的、不可變的排序字典產生器。

CreateBuilder<TKey,TValue>(IComparer<TKey>, IEqualityComparer<TValue>)

建立新的、不可變的排序字典產生器。

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

使用指定的索引鍵比較子,從指定的項目範圍,建立新的、不可變的排序字典。

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

使用指定的索引鍵與值比較子,從指定的項目範圍,建立新的、不可變的排序字典。

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

建立不可變的排序字典,其中包含指定的項目,並使用預設的比較子。

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

列舉索引鍵/值組的序列,並產生不可變的排序字典作為內容。

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

列舉索引鍵/值組的序列,並使用指定的索引鍵比較子產生不可變的排序字典作為內容。

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

列舉索引鍵/值組的序列,並使用指定的索引鍵與值比較子產生不可變的排序字典作為內容。

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

從產生器字典目前內容建立不可變的已排序字典。

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

列舉及轉換序列,並使用指定的索引鍵與值比較子產生不可變的排序字典作為內容。

適用於

執行緒安全性

此型別具備執行緒安全。