Example #1
0
 public override bool Equals(object?obj)
 {
     if (object.ReferenceEquals(this, obj))
     {
         return(true);
     }
     if (this.GetType() == obj?.GetType())
     {
         CachedSpecification <T, K> other = (CachedSpecification <T, K>)obj;
         return(this.Equals(other));
     }
     return(false);
 }
Example #2
0
 public bool Equals(CachedSpecification <T, K>?other)
 {
     if (object.ReferenceEquals(this, other))
     {
         return(true);
     }
     if (other is null)
     {
         return(false);
     }
     return(EqualityComparer <K> .Default.Equals(this.Key, other.Key) &&
            (this.CacheDuration == other.CacheDuration) &&
            base.Equals(other));
 }