public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } KeyMatcher <TKey> other = (KeyMatcher <TKey>)obj; if (compareTo == null) { if (other.compareTo != null) { return(false); } } else if (!compareTo.Equals(other.compareTo)) { return(false); } return(true); }
public override bool Equals(object?obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } KeyMatcher <TKey> other = (KeyMatcher <TKey>)obj; if (CompareToValue == null) { if (other.CompareToValue != null) { return(false); } } else if (!CompareToValue.Equals(other.CompareToValue)) { return(false); } return(true); }