public class KeyValuePairComparer<TKey, TValue> : IEqualityComparer<KeyValuePair<TKey, TValue>>
public static KeyValuePairComparer<TKey, TValue> Default { get;} = new KeyValuePairComparer<TKey, TValue>();
public bool Equals(KeyValuePair<TKey, TValue> x, KeyValuePair<TKey, TValue> y) => object.Equals(x.Key, y.Key) && object.Equals(x.Value, y.Value);
public int GetHashCode(KeyValuePair<TKey, TValue> obj) => HashCode.Combine(obj.Key, obj.Value);