System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="6.0.0-preview.6.21352.12" />

.NET API 193,648 bytes

 ImmutableSortedDictionary

public static class ImmutableSortedDictionary
Provides a set of initialization methods for instances of the ImmutableSortedDictionary<T, U> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install)
public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>()

Creates an empty immutable sorted dictionary.

public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>(IComparer<TKey> keyComparer)

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

public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>(IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)

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

public static Builder<TKey, TValue> CreateBuilder<TKey, TValue>()

Creates a new immutable sorted dictionary builder.

public static Builder<TKey, TValue> CreateBuilder<TKey, TValue>(IComparer<TKey> keyComparer)

Creates a new immutable sorted dictionary builder.

public static Builder<TKey, TValue> CreateBuilder<TKey, TValue>(IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)

Creates a new immutable sorted dictionary builder.

public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items)

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

public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey> keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items)

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

public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items)

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

public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers.

public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this Builder<TKey, TValue> builder)

public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IComparer<TKey> keyComparer)

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer.

public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector)

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

public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)

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 static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey> keyComparer)

Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer.

public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source)

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