private static int DefaultConsoleWrite(ConsoleOutLine line) { if (line.Error) { Console.Error.WriteLine(line.Line); } else { Console.WriteLine(line.Line); } return(1); }
private void WriteConsoleLine(ConsoleOutLine m) { var resetString = new string(' ', Console.WindowWidth); Console.Write(resetString); Console.Write("\r"); var foreground = Console.ForegroundColor; var background = Console.BackgroundColor; var written = _writeMessageToConsole(m); Console.ForegroundColor = foreground; Console.BackgroundColor = background; _originalCursorTop += written; }