ImmutableSortedDictionary<TKey, TValue>
public sealed class ImmutableSortedDictionary<TKey, TValue> : IImmutableDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, ISortKeyCollection<TKey>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection
Represents an immutable sorted dictionary.
NuGet package: System.Collections.Immutable (about immutable collections and how to install)
public sealed class Builder<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection
Represents a sorted dictionary that mutates with little or no memory allocations and that can produce or build on immutable sorted dictionary instances very efficiently.
NuGet package: System.Collections.Immutable (about immutable collections and how to install)
public struct Enumerator<TKey, TValue> : IEnumerator<KeyValuePair<TKey, TValue>>, IEnumerator, IDisposable, ISecurePooledObjectUser
Enumerates the contents of a binary tree.
NuGet package: System.Collections.Immutable (about immutable collections and how to install)
Gets an empty immutable sorted dictionary.
Gets the number of key/value pairs in the immutable sorted dictionary.
Gets a value that indicates whether this instance of the immutable sorted dictionary is empty.
Gets the TValue associated with the specified key.
Gets the key comparer for the immutable sorted dictionary.
Gets the keys in the immutable sorted dictionary.
Gets the value comparer used to determine whether values are equal.
Gets the values in the immutable sorted dictionary.
Adds an element with the specified key and value to the immutable sorted dictionary.
public ImmutableSortedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
Adds the specific key/value pairs to the immutable sorted dictionary.
Retrieves an empty immutable sorted dictionary that has the same ordering and key/value comparison rules as this dictionary instance.
Determines whether this immutable sorted dictionary contains the specified key/value pair.
Determines whether this immutable sorted map contains the specified key.
Determines whether the immutable sorted dictionary contains an element with the specified value.
Returns an enumerator that iterates through the immutable sorted dictionary.
Removes the element with the specified value from the immutable sorted dictionary.
Removes the elements with the specified keys from the immutable sorted dictionary.
Sets the specified key and value in the immutable sorted dictionary, possibly overwriting an existing value for the given key.
public ImmutableSortedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
Sets the specified key/value pairs in the immutable sorted dictionary, possibly overwriting existing values for the keys.
Creates an immutable sorted dictionary with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces.
Determines whether this dictionary contains a specified key.
Gets the value associated with the specified key.
Returns a read-only reference to the value associated with the provided key.
public ImmutableSortedDictionary<TKey, TValue> WithComparers(IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)
Gets an instance of the immutable sorted dictionary that uses the specified key and value comparers.
Gets an instance of the immutable sorted dictionary that uses the specified key comparer.