예제 #1
0
 public override bool Equals(object obj)
 {
     if (obj is null)
     {
         return(false);
     }
     if (!(obj is RegexCharacterRange characterRangeSet))
     {
         return(false);
     }
     return
         (StartCharacter.Equals(characterRangeSet.StartCharacter) &&
          EndCharacter.Equals(characterRangeSet.EndCharacter));
 }
예제 #2
0
        public override bool Equals(object obj)
        {
            if ((object)obj == null)
            {
                return(false);
            }
            var characterRangeSet = obj as RegexCharacterRange;

            if ((object)characterRangeSet == null)
            {
                return(false);
            }
            return
                (StartCharacter.Equals(characterRangeSet.StartCharacter) &&
                 EndCharacter.Equals(characterRangeSet.EndCharacter));
        }
예제 #3
0
 int ComputeHashCode()
 {
     return(HashCode.Compute(
                StartCharacter.GetHashCode(),
                EndCharacter.GetHashCode()));
 }
예제 #4
0
 public override string ToString()
 {
     return(StartCharacter.ToString());
 }
예제 #5
0
 public override bool Equals(object obj)
 {
     return(obj is RegexCharactersRange other &&
            StartCharacter.Equals(other.StartCharacter) &&
            EndCharacter.Equals(other.EndCharacter));
 }