Namespace: Assorted.Utils.Collections
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0
Inheritance: object→
DictionaryExtensions
Extends the dictionary collections.
public static class DictionaryExtensions
Method | Description |
---|---|
ForEach<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue>, IEnumerable<TKey>, Action<TKey, TValue>) | Performs an action on each value in the dictionary with the specified keys. The missing keys are ignored. |
ForEach<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue>, IEnumerable<TKey>, Action<TKey, TValue>, Action<TKey>) | Performs an action on each value in the dictionary with the specified keys. The existing and missing keys have their own actions. |
GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue>, TKey, TValue) | Gets the value that is associated with a specified key. Returns a specific value if the key is not found. |
GetValueOrDefault<TValue>(this IDictionary<string, object>, string, TValue) | Gets the value of a specified type that is associated with a specified key. Returns a specific value if the key is not found. |
GetValuesFor<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue>, IEnumerable<TKey>) | Returns values of the source dictionary with the specified keys. The missing keys are ignored. |
GetValuesFor<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue>, IEnumerable<TKey>, TValue) | Returns values of the source dictionary with the specified keys. Returns a specific value for any missing key in the dictionary. |
RemoveWhere<TKey, TValue>(this IDictionary<TKey, TValue>, Func<TKey, TValue, bool>) | Removes entries from the dictionary based on a predicate. |
Any public static member of this type is thread-safe, but instance members are not guaranteed to be thread-safe.
This document is generated by DG.