/// <summary> /// Compares two dictionaries key by key using the given <see cref="IEqualityComparer{T}"/> for <typeparamref name="TValue"/>. /// </summary> public static bool Diff <TKey, TValue>(this IDictionary <TKey, TValue> original, IDictionary <TKey, TValue> other, IEqualityComparer <TValue> comparer, out DictionaryDiff <TKey, TValue> diff) { diff = new DictionaryDiff <TKey, TValue>(original, other, comparer); return(diff.Added.Count != 0 || diff.Removed.Count != 0 || diff.Changed.Count != 0); }
/// <summary> /// Compares two dictionaries key by key using the <see cref="EqualityComparer{TValue}.Default"/> for <typeparamref name="TValue"/>. /// </summary> public static bool Diff <TKey, TValue>(this IDictionary <TKey, TValue> original, IDictionary <TKey, TValue> other, out DictionaryDiff <TKey, TValue> diff) { return(Diff(original, other, EqualityComparer <TValue> .Default, out diff)); }