• API Reference

    Show / Hide Table of Contents
    • Recore
      • AbsoluteUri
      • AsyncAction
      • AsyncAction<T>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7>
      • AsyncAction<T1, T2, T3, T4, T5, T6>
      • AsyncAction<T1, T2, T3, T4, T5>
      • AsyncAction<T1, T2, T3, T4>
      • AsyncAction<T1, T2, T3>
      • AsyncAction<T1, T2>
      • AsyncDefer
      • AsyncFunc<T, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, TResult>
      • AsyncFunc<T1, T2, T3, T4, TResult>
      • AsyncFunc<T1, T2, T3, TResult>
      • AsyncFunc<T1, T2, TResult>
      • AsyncFunc<TResult>
      • Defer
      • Either
      • Either<TLeft, TRight>
      • Func
      • ObjectExtensions
      • Of<T>
      • OfJsonAttribute
      • Optional
      • Optional<T>
      • RelativeUri
      • Result
      • Result.AsyncCatcher<TValue>
      • Result.Catcher<TValue>
      • Result<TValue, TError>
      • Unit
      • UriExtensions
    • Recore.Collections.Generic
      • AnonymousEqualityComparer<T>
      • ICollectionExtensions
      • IDictionaryExtensions
      • IIterator<T>
      • Iterator
      • LinkedListExtensions
      • ListExtensions
      • MappedComparer<T, TMapped>
      • MappedEqualityComparer<T, TMapped>
    • Recore.Linq
      • Renumerable
    • Recore.Security.Cryptography
      • SecureCompare
    • Recore.Text.Json.Serialization.Converters
      • OverrideEitherConverter<TLeft, TRight>
      • OverrideResultConverter<TValue, TError>
    • Recore.Threading.Tasks
      • TaskExtensions

    Class IDictionaryExtensions

    Provides additional methods for working with IDictionary<TKey,TValue>.

    Inheritance
    Object
    IDictionaryExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Recore.Collections.Generic
    Assembly: Recore.dll
    Syntax
    public static class IDictionaryExtensions

    Methods

    | Improve this Doc View Source

    AddRange<TKey, TValue>(IDictionary<TKey, TValue>, IEnumerable<KeyValuePair<TKey, TValue>>)

    Adds all elements of the specified collection to the IDictionary<TKey,TValue>. Existing elements are overwritten if there are duplicates.

    Declaration
    public static void AddRange<TKey, TValue>(this IDictionary<TKey, TValue> dict, IEnumerable<KeyValuePair<TKey, TValue>> collection)
    Parameters
    Type Name Description
    IDictionary<TKey, TValue> dict
    IEnumerable<KeyValuePair<TKey, TValue>> collection
    Type Parameters
    Name Description
    TKey
    TValue
    | Improve this Doc View Source

    Append<TKey, TValue>(IDictionary<TKey, TValue>, TKey, TValue)

    Adds an entry to the IDictionary<TKey,TValue> and passes the dictionary through.

    Declaration
    public static IDictionary<TKey, TValue> Append<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key, TValue value)
    Parameters
    Type Name Description
    IDictionary<TKey, TValue> dict
    TKey key
    TValue value
    Returns
    Type Description
    IDictionary<TKey, TValue>
    Type Parameters
    Name Description
    TKey
    TValue
    | Improve this Doc View Source

    GetOrAdd<TKey, TValue>(IDictionary<TKey, TValue>, TKey, TValue)

    Adds a key/value pair to the IDictionary<TKey,TValue> if the key does not already exist. Returns the new value, or the existing value if the key already exists.

    Declaration
    public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key, TValue value)
    Parameters
    Type Name Description
    IDictionary<TKey, TValue> dict

    The dictionary to be operated on.

    TKey key

    The key of the element to add.

    TValue value

    The value to be added, if the key does not already exist.

    Returns
    Type Description
    TValue

    The value for the key. This will be either the existing value for the key if the key is already in the dictionary, or the new value if the key was not in the dictionary.

    Type Parameters
    Name Description
    TKey
    TValue
    | Improve this Doc View Source

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

    Gets the value that is associated with the specific key or the default value for the type TValue.

    Declaration
    public static TValue GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key)
    Parameters
    Type Name Description
    IDictionary<TKey, TValue> dict
    TKey key
    Returns
    Type Description
    TValue
    Type Parameters
    Name Description
    TKey
    TValue
    Remarks

    This is duplicated from GetValueOrDefault<TKey,TValue>(IReadOnlyDictionary<TKey,TValue>, TKey) because IDictionary<TKey,TValue> does not extend IReadOnlyDictionary<TKey,TValue>.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX