Search Results for

    Show / Hide Table of Contents

    Class DictionaryEx<TKey, TValue>

    A dictionary with support for:

    • deep Equals (instead of ref comparison)
    • deep GetHashCode (2 refs with the same values will return the same hash code). The default dictionary returns hash code based on reference.
    Inheritance
    object
    Dictionary<TKey, TValue>
    DictionaryEx<TKey, TValue>
    Implements
    IDictionary<TKey, TValue>
    ICollection<KeyValuePair<TKey, TValue>>
    IDictionary
    ICollection
    IReadOnlyDictionary<TKey, TValue>
    IReadOnlyCollection<KeyValuePair<TKey, TValue>>
    IEnumerable<KeyValuePair<TKey, TValue>>
    IEnumerable
    ISerializable
    IDeserializationCallback
    IEquatable<DictionaryEx<TKey, TValue>>
    Inherited Members
    Dictionary<TKey, TValue>.Add(TKey, TValue)
    Dictionary<TKey, TValue>.Clear()
    Dictionary<TKey, TValue>.ContainsKey(TKey)
    Dictionary<TKey, TValue>.ContainsValue(TValue)
    Dictionary<TKey, TValue>.GetEnumerator()
    Dictionary<TKey, TValue>.GetObjectData(SerializationInfo, StreamingContext)
    Dictionary<TKey, TValue>.OnDeserialization(object)
    Dictionary<TKey, TValue>.Remove(TKey)
    Dictionary<TKey, TValue>.Remove(TKey, out TValue)
    Dictionary<TKey, TValue>.TryGetValue(TKey, out TValue)
    Dictionary<TKey, TValue>.TryAdd(TKey, TValue)
    Dictionary<TKey, TValue>.EnsureCapacity(int)
    Dictionary<TKey, TValue>.TrimExcess()
    Dictionary<TKey, TValue>.TrimExcess(int)
    Dictionary<TKey, TValue>.Comparer
    Dictionary<TKey, TValue>.Count
    Dictionary<TKey, TValue>.Keys
    Dictionary<TKey, TValue>.Values
    Dictionary<TKey, TValue>.this[TKey]
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: Sdl.Core.Bcm.BcmModel.Collections
    Assembly: Sdl.Core.Bcm.BcmModel.dll
    Syntax
    public class DictionaryEx<TKey, TValue> : Dictionary<TKey, TValue>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, ISerializable, IDeserializationCallback, IEquatable<DictionaryEx<TKey, TValue>>
    Type Parameters
    Name Description
    TKey
    TValue

    Constructors

    DictionaryEx()

    Initializes a new instance of the DictionaryEx<TKey, TValue> class.

    Declaration
    public DictionaryEx()

    DictionaryEx(DictionaryEx<TKey, TValue>)

    Initializes a new instance of the DictionaryEx<TKey, TValue> class, based on another instance.

    Declaration
    public DictionaryEx(DictionaryEx<TKey, TValue> other)
    Parameters
    Type Name Description
    DictionaryEx<TKey, TValue> other

    The other instance from which to construct the current instance.

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

    Initializes a new instance of the DictionaryEx<TKey, TValue> class.

    Declaration
    public DictionaryEx(IEnumerable<KeyValuePair<TKey, TValue>> items)
    Parameters
    Type Name Description
    IEnumerable<KeyValuePair<TKey, TValue>> items

    The items.

    Methods

    Equals(DictionaryEx<TKey, TValue>)

    Performs a deep-equals comparison.
    System.Object.Equals(object)

    Declaration
    public bool Equals(DictionaryEx<TKey, TValue> other)
    Parameters
    Type Name Description
    DictionaryEx<TKey, TValue> other
    Returns
    Type Description
    bool

    Equals(object)

    Performs a deep-equals comparison.
    System.Object.Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)

    GetHashCode()

    Returns a hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for this instance.

    Overrides
    object.GetHashCode()

    Implements

    IDictionary<TKey, TValue>
    ICollection<T>
    IDictionary
    ICollection
    IReadOnlyDictionary<TKey, TValue>
    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable
    ISerializable
    IDeserializationCallback
    IEquatable<T>
    In this article
    Back to top Generated by DocFX