public ConsoleProgram(string[] commandLine) { CommandLine = commandLine; Handlers = new Dictionary<string, ConsoleActionData>(); Arguments = new ConsoleArguments(); Args.Parse(commandLine, CommandLinePrefixes, CommandLineSeparators, Arguments); if (!Arguments.Quiet) ConsoleWindow = new ConsoleWindow(); }
protected virtual void Dispose(bool disposing) { if (ConsoleWindow == null) return; Console.Out.Flush(); if (!Arguments.Quiet) { Console.Write("\nPress any key to continue . . . "); Console.Out.Flush(); Console.ReadKey(true); if (disposing) ConsoleWindow.Dispose(); } ConsoleWindow = null; }