ImmutableSortedDictionary<TKey, TValue>.Builder Class

 

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)

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

System.Object
  System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder

[DebuggerDisplayAttribute("Count = {Count}")]
[DefaultMemberAttribute("Item")]
public sealed class Builder : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, 
	IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, 
	IEnumerable<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, 
	IEnumerable

NameDescription
System_CAPS_pubpropertyCount

Gets the number of elements in this immutable sorted dictionary.

System_CAPS_pubpropertyItem[TKey]

Gets or sets the value for a specified key in the immutable sorted dictionary.

System_CAPS_pubpropertyKeyComparer

Gets or sets the key comparer.

System_CAPS_pubpropertyKeys

Gets a strongly typed, read-only collection of elements.

System_CAPS_pubpropertyValueComparer

Gets or sets the value comparer.

System_CAPS_pubpropertyValues

Gets a collection that contains the values of the immutable sorted dictionary.

NameDescription
System_CAPS_pubmethodAdd(TKey, TValue)

Adds an element that has the specified key and value to the immutable sorted dictionary.

System_CAPS_pubmethodAdd(KeyValuePair<TKey, TValue>)

Adds the specified item to the immutable sorted dictionary.

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

Adds a sequence of values to the immutable sorted dictionary.

System_CAPS_pubmethodClear()

Removes all items from the immutable sorted dictionary.

System_CAPS_pubmethodContains(KeyValuePair<TKey, TValue>)

Determines whether the immutable sorted dictionary contains a specific value.

System_CAPS_pubmethodContainsKey(TKey)

Determines whether the immutable sorted dictionary contains an element with the specified key.

System_CAPS_pubmethodContainsValue(TValue)

Determines whether the immutable sorted dictionary contains an element with the specified value.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator that iterates through the immutable sorted dictionary.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodGetValueOrDefault(TKey)

Gets the value for a given key if a matching key exists in the dictionary; otherwise the default value.

System_CAPS_pubmethodGetValueOrDefault(TKey, TValue)

Gets the value for a given key if a matching key exists in the dictionary; otherwise the default value.

System_CAPS_pubmethodRemove(TKey)

Removes the element with the specified key from the immutable sorted dictionary.

System_CAPS_pubmethodRemove(KeyValuePair<TKey, TValue>)

Removes the first occurrence of a specific object from the immutable sorted dictionary.

System_CAPS_pubmethodRemoveRange(IEnumerable<TKey>)

Removes any entries with keys that match those found in the specified sequence from the immutable sorted dictionary.

System_CAPS_pubmethodToImmutable()

Creates an immutable sorted dictionary based on the contents of this instance.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodTryGetKey(TKey, TKey)

Determines whether this dictionary contains a specified key.

System_CAPS_pubmethodTryGetValue(TKey, TValue)

Gets the value associated with the specified key.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[], Int32)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection.CopyTo(Array, Int32)

Copies the elements of the dictionary to an array, starting at a particular array index.

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

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Add(Object, Object)

Adds an element with the provided key and value to the dictionary object.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Contains(Object)

Determines whether the dictionary object contains an element with the specified key.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.GetEnumerator()

Returns an IDictionaryEnumerator object for the dictionary.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Remove(Object)

Removes the element with the specified key from the dictionary.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

NameDescription
System_CAPS_pubmethodToImmutableArray<KeyValuePair<TKey, TValue>>()

Creates an immutable array from the specified collection.(Defined by ImmutableArray.)

System_CAPS_pubmethodToImmutableDictionary<KeyValuePair<TKey, TValue>, TKey>(Func<KeyValuePair<TKey, TValue>, TKey>)

Overloaded. Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<KeyValuePair<TKey, TValue>, TKey>(Func<KeyValuePair<TKey, TValue>, TKey>, IEqualityComparer<TKey>)

Overloaded. Constructs an immutable dictionary based on some transformation of a sequence.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<KeyValuePair<TKey, TValue>, TKey, TValue>(Func<KeyValuePair<TKey, TValue>, TKey>, Func<KeyValuePair<TKey, TValue>, TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<KeyValuePair<TKey, TValue>, TKey, TValue>(Func<KeyValuePair<TKey, TValue>, TKey>, Func<KeyValuePair<TKey, TValue>, TValue>, IEqualityComparer<TKey>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<KeyValuePair<TKey, TValue>, TKey, TValue>(Func<KeyValuePair<TKey, TValue>, TKey>, Func<KeyValuePair<TKey, TValue>, TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableHashSet<KeyValuePair<TKey, TValue>>()

Overloaded. Enumerates a sequence and produces an immutable hash set of its contents.(Defined by ImmutableHashSet.)

System_CAPS_pubmethodToImmutableHashSet<KeyValuePair<TKey, TValue>>(IEqualityComparer<KeyValuePair<TKey, TValue>>)

Overloaded. Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.(Defined by ImmutableHashSet.)

System_CAPS_pubmethodToImmutableList<KeyValuePair<TKey, TValue>>()

Enumerates a sequence and produces an immutable list of its contents.(Defined by ImmutableList.)

System_CAPS_pubmethodToImmutableSortedDictionary<KeyValuePair<TKey, TValue>, TKey, TValue>(Func<KeyValuePair<TKey, TValue>, TKey>, Func<KeyValuePair<TKey, TValue>, TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedDictionary<KeyValuePair<TKey, TValue>, TKey, TValue>(Func<KeyValuePair<TKey, TValue>, TKey>, Func<KeyValuePair<TKey, TValue>, TValue>, IComparer<TKey>)

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

System_CAPS_pubmethodToImmutableSortedDictionary<KeyValuePair<TKey, TValue>, TKey, TValue>(Func<KeyValuePair<TKey, TValue>, TKey>, Func<KeyValuePair<TKey, TValue>, TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

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

System_CAPS_pubmethodToImmutableSortedSet<KeyValuePair<TKey, TValue>>()

Overloaded. Enumerates a sequence and produces an immutable sorted set of its contents.(Defined by ImmutableSortedSet.)

System_CAPS_pubmethodToImmutableSortedSet<KeyValuePair<TKey, TValue>>(IComparer<KeyValuePair<TKey, TValue>>)

Overloaded. Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.(Defined by ImmutableSortedSet.)

This class allows multiple combinations of changes to be made to a set with equal efficiency.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: