private static void OnOutPutContent(object s, OutPutContentEventArgs e) { Console.WriteLine(); var c = 0; foreach (var chunk in e.Chunks) { //TODO: Adjust to actual output size according to window. //perhaps a custom TextWriter for Console.Out that //does all formatting? That way we can easaly switch to WPF as well if (++c == 10) { c = 0; Console.WriteLine("Hit key to continue..."); Console.ReadKey(); Console.WriteLine(); } if (chunk.ContentType == ContentType.Default) Console.ForegroundColor = ConsoleColor.Cyan; else if (chunk.ContentType == ContentType.Warning) Console.ForegroundColor = ConsoleColor.Yellow; else if (chunk.ContentType == ContentType.Error) Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(chunk.Content); Console.ResetColor(); Console.WriteLine(); } }
public void OnOutPutContent(object sender, OutPutContentEventArgs e) { if (OutPutContent != null) OutPutContent(sender, e); }