Exemplo n.º 1
0
 public static bool FullEqual <TKey, TValue>(this IDictionary <TKey, TValue> left, IDictionary <TKey, TValue> right)
 => left.Keys.SequenceEqual(right.Keys) && left.Join(right, x => x.Key, x => x.Key, (x, y) => x.Equals(y))
 .Aggregate((x, y) => x && y);
Exemplo n.º 2
0
 public static bool HasAllAndEqual <TKey, TValue>(this IDictionary <TKey, TValue> left, IDictionary <TKey, TValue> right)
 => left.Join(right, x => x.Key, x => x.Key, (x, y) => x.Equals(y))
 .Aggregate((x, y) => x && y);