public override int GetHashCode() { return(OldPosition ^ NewPosition ^ OldLength ^ NewLength ^ NewBuffer.GetHashCode() ^ OldBuffer.GetHashCode()); }
/// <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); } }
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)); }