Class ImmutableEquatableDictionary
Provides a set of static methods for creating instances of ImmutableEquatableDictionary<TKey, TValue>.
public static class ImmutableEquatableDictionary
- Inheritance
-
ImmutableEquatableDictionary
- Inherited Members
Methods
Empty<TKey, TValue>()
Gets an empty ImmutableEquatableDictionary<TKey, TValue> instance.
public static ImmutableEquatableDictionary<TKey, TValue> Empty<TKey, TValue>() where TKey : IEquatable<TKey> where TValue : IEquatable<TValue>
Returns
- ImmutableEquatableDictionary<TKey, TValue>
An empty ImmutableEquatableDictionary<TKey, TValue> instance.
Type Parameters
TKeyThe key type of the dictionary.
TValueThe value type of the dictionary.
ToImmutableEquatableDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>)
Creates an ImmutableEquatableDictionary<TKey, TValue> instance from the specified values.
public static ImmutableEquatableDictionary<TKey, TValue> ToImmutableEquatableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> values) where TKey : IEquatable<TKey> where TValue : IEquatable<TValue>
Parameters
valuesIEnumerable<KeyValuePair<TKey, TValue>>The source key/value pairs with which to populate the dictionary.
Returns
- ImmutableEquatableDictionary<TKey, TValue>
An ImmutableEquatableDictionary<TKey, TValue> containing the specified values.
Type Parameters
TKeyThe key type of the dictionary.
TValueThe value type of the dictionary.
ToImmutableEquatableDictionary<TKey, TValue>(IEnumerable<TValue>, Func<TValue, TKey>)
Creates an ImmutableEquatableDictionary<TKey, TValue> instance from the specified values.
public static ImmutableEquatableDictionary<TKey, TValue> ToImmutableEquatableDictionary<TKey, TValue>(this IEnumerable<TValue> values, Func<TValue, TKey> keySelector) where TKey : IEquatable<TKey> where TValue : IEquatable<TValue>
Parameters
valuesIEnumerable<TValue>The source values used to populate the dictionary.
keySelectorFunc<TValue, TKey>The projection function from which to derive a key.
Returns
- ImmutableEquatableDictionary<TKey, TValue>
An ImmutableEquatableDictionary<TKey, TValue> containing the specified values.
Type Parameters
TKeyThe key type of the dictionary.
TValueThe value type of the dictionary.
ToImmutableEquatableDictionary<TSource, TKey, TValue>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TValue>)
Creates an ImmutableEquatableDictionary<TKey, TValue> instance from the specified values.
public static ImmutableEquatableDictionary<TKey, TValue> ToImmutableEquatableDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> valueSelector) where TKey : IEquatable<TKey> where TValue : IEquatable<TValue>
Parameters
sourceIEnumerable<TSource>The source enumerable seeding the dictionary entries.
keySelectorFunc<TSource, TKey>The projection function from which to derive a key.
valueSelectorFunc<TSource, TValue>The projection function from which to derive a value.
Returns
- ImmutableEquatableDictionary<TKey, TValue>
An ImmutableEquatableDictionary<TKey, TValue> containing the specified values.
Type Parameters
TSourceThe element type of the source enumerable.
TKeyThe key type of the dictionary.
TValueThe value type of the dictionary.