Ejemplo n.º 1
0
        public virtual bool Equals(IKeyMask <T, K> other)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (GetType() != other.GetType())
            {
                return(false);
            }

            return(Key.Equals(other.Key));
        }
Ejemplo n.º 2
0
 public override int GetHashCode(IKeyMask <T, K> obj)
 {
     return(obj?.Key?.GetHashCode() ?? 0);
 }
Ejemplo n.º 3
0
 public override bool Equals(IKeyMask <T, K> x, IKeyMask <T, K> y)
 {
     return(KeyComparer.Equals(x.Key, y.Key));
 }