Example #1
0
 public bool Equals(IntegrityRule <T> left, IntegrityRule <T> right)
 {
     if (ReferenceEquals(null, left) && ReferenceEquals(null, right))
     {
         return(true);
     }
     if (ReferenceEquals(null, left))
     {
         return(false);
     }
     else
     {
         return(left.Equals(right));
     }
 }
Example #2
0
        public bool Equals(IntegrityRule <T> other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            var t = GetType();

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

            return
                (Validator.GetType() == other.Validator.GetType() &&
                 Resolver.GetType() == other.Resolver.GetType());
        }
Example #3
0
 public int GetHashCode(IntegrityRule <T> obj)
 {
     return(obj.GetHashCode());
 }