예제 #1
0
 void AddToBuffer(ConsoleLine consoleLine) {
     lock (_buffer) {
         var last = _buffer.LastOrDefault();
         // Not exactly how \r works in console, but close enough for our purpose
         if ((last != null) && !last.Terminated) {
             _buffer.RemoveAt(_buffer.Count - 1);
             // If the line didn't have any termination, we should prepend the previous line ...
             // we still replace the line object because it might be terminated now etc ;-)
             if (last.Open)
                 consoleLine.Prepend(last);
         }
         _buffer.Add(consoleLine);
     }
 }
예제 #2
0
 void AddToBuffer(ConsoleLine consoleLine)
 {
     lock (_buffer) {
         var last = _buffer.LastOrDefault();
         // Not exactly how \r works in console, but close enough for our purpose
         if ((last != null) && !last.Terminated)
         {
             _buffer.RemoveAt(_buffer.Count - 1);
             // If the line didn't have any termination, we should prepend the previous line ...
             // we still replace the line object because it might be terminated now etc ;-)
             if (last.Open)
             {
                 consoleLine.Prepend(last);
             }
         }
         _buffer.Add(consoleLine);
     }
 }
예제 #3
0
 public void Prepend(ConsoleLine content) {
     Content = content.Content + Content;
 }
예제 #4
0
 public void Prepend(ConsoleLine content)
 {
     Content = content.Content + Content;
 }