Exemplo n.º 1
0
 public override int GetHashCode()
 {
     return(OldPosition
            ^ NewPosition
            ^ OldLength
            ^ NewLength
            ^ NewBuffer.GetHashCode()
            ^ OldBuffer.GetHashCode());
 }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (!(obj is TextChange))
            {
                return(false);
            }
            var change = (TextChange)obj;

            return((change.OldPosition == OldPosition) &&
                   (change.NewPosition == NewPosition) &&
                   (change.OldLength == OldLength) &&
                   (change.NewLength == NewLength) &&
                   OldBuffer.Equals(change.OldBuffer) &&
                   NewBuffer.Equals(change.NewBuffer));
        }