Beispiel #1
0
 public override bool Equals(object other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (other is NotSpecification <T> otherSpec)
     {
         return(_spec.Equals(otherSpec._spec));
     }
     return(false);
 }
Beispiel #2
0
        public override bool Equals(object other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            if (GetType() != other.GetType())
            {
                return(false);
            }

            var otherSpec = other as NotSpecification <T>;

            return(spec.Equals(otherSpec.spec));
        }
        public override bool Equals(object other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            if (GetType() != other.GetType())
            {
                return(false);
            }

            var otherSpec = other as AndSpecification <T>;

            return(_spec1.Equals(otherSpec._spec1) && _spec2.Equals(otherSpec._spec2));
        }