Пример #1
0
 public override int GetHashCode()
 {
     return(OldPosition
            ^ NewPosition
            ^ OldLength
            ^ NewLength
            ^ NewBuffer.GetHashCode()
            ^ OldBuffer.GetHashCode());
 }
Пример #2
0
        /// <summary>
        /// Clears screen.
        /// </summary>
        ///
        public void Clear()
        {
            OldBuffer.Clear();

            Console.BackgroundColor = Map(Screen.BackColor);
            Console.ForegroundColor = Map(Screen.ForeColor);
            Console.Clear();

            if (Console.BufferHeight != Height || Console.BufferWidth != Width)
            {
                SetBufferSize(Width, Height);
            }
        }
Пример #3
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));
        }