System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="8.0.0-preview.2.23128.3" />

.NET API 250,032 bytes

 ImmutableSortedDictionary

public static class ImmutableSortedDictionary
A set of initialization methods for instances of ImmutableSortedDictionary<T, U>.
public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>()

Returns an empty collection.

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

Returns an empty collection.

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

Returns an empty collection.

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 a new immutable collection prefilled with the specified items.

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

Creates a new immutable collection prefilled with the specified items.

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

Creates a new immutable collection prefilled with the specified items.

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)

Constructs an immutable sorted dictionary based on some transformation of a sequence.

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)

Constructs an immutable sorted dictionary based on some transformation of a sequence.

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

Constructs an immutable sorted dictionary based on some transformation of a sequence.

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

Creates an immutable sorted dictionary given a sequence of key=value pairs.

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

Creates an immutable sorted dictionary given a sequence of key=value pairs.

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

Creates an immutable sorted dictionary given a sequence of key=value pairs.