Прочетете на английски Редактиране

Споделяне чрез


ImmutableSortedDictionary Class

Definition

Provides a set of initialization methods for instances of the ImmutableSortedDictionary<TKey,TValue> class.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

C#
public static class ImmutableSortedDictionary
Inheritance
ImmutableSortedDictionary

Methods

Create<TKey,TValue>()

Creates an empty immutable sorted dictionary.

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

Creates an empty immutable sorted dictionary that uses the specified key and value comparers.

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

Creates an empty immutable sorted dictionary that uses the specified key comparer.

CreateBuilder<TKey,TValue>()

Creates a new immutable sorted dictionary builder.

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

Creates a new immutable sorted dictionary builder.

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

Creates a new immutable sorted dictionary builder.

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

Creates a new immutable sorted dictionary from the specified range of items with the specified key comparer.

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

Creates a new immutable sorted dictionary from the specified range of items with the specified key and value comparers.

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

Creates an immutable sorted dictionary that contains the specified items and uses the default comparer.

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

Enumerates a sequence of key/value pairs and produces an immutable sorted dictionary of its contents.

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

Creates an immutable sorted dictionary from the current contents of the builder's dictionary.

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

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.

Applies to

Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

Thread Safety

This type is thread safe.