private void InitialiseTerminal() { //console = new NativeConsole(false); terminal = new ConsoleApi.Terminal(); terminal.Start(@"ping localhost", 126, 32); _ = Task.Run(CopyConsoleToWindow); }
static void Main(string[] args) { try { using (var terminal = new ConsoleApi.Terminal()) { terminal.Start(@"ping localhost", 126, 32); _ = Task.Run(() => CopyPipeToOutput(terminal.Output)); terminal.WaitToExit(); } } catch (Exception e) { System.Console.Error.WriteLine(e.Message); } }