ImmutableDictionary ImmutableDictionary ImmutableDictionary ImmutableDictionary Class

Definition

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

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

public ref class ImmutableDictionary abstract sealed
public static class ImmutableDictionary
type ImmutableDictionary = class
Public Module ImmutableDictionary
Inheritance
ImmutableDictionaryImmutableDictionaryImmutableDictionaryImmutableDictionary

Methods

Contains<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue) Contains<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue) Contains<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue) Contains<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue)

Determines whether the specified immutable dictionary contains the specified key/value pair.

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

Creates an empty immutable dictionary.

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

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

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

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

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

Creates a new immutable dictionary builder.

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

Creates a new immutable dictionary builder.

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

Creates a new immutable dictionary builder.

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

Creates a new immutable dictionary that contains the specified items.

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

Creates a new immutable dictionary that contains the specified items and uses the specified key comparer.

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

Creates a new immutable dictionary that contains the specified items and uses the specified key comparer.

GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue) GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue) GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue) GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey, TValue)

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

GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey) GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey) GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey) GetValueOrDefault<TKey,TValue>(IImmutableDictionary<TKey,TValue>, TKey)

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

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

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

ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>) ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>) ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>) ToImmutableDictionary<TKey,TValue>(ImmutableDictionary<TKey,TValue>)

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

ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>)

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

ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

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

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

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

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)

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

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

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

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys.

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

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

Applies to

Thread Safety

This type is thread safe.