Пример #1
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            StringMatcher <TKey> other = (StringMatcher <TKey>)obj;

            if (CompareToValue == null)
            {
                if (other.CompareToValue != null)
                {
                    return(false);
                }
            }
            else if (!CompareToValue.Equals(other.CompareToValue))
            {
                return(false);
            }
            if (!CompareWithOperator.Equals(other.CompareWithOperator))
            {
                return(false);
            }
            return(true);
        }
Пример #2
0
 public bool IsMatch(TKey key)
 {
     return(CompareToValue.Equals(key));
 }