static void SafeMain(string[] args) { Console.WriteLine("SqlNado.Cli - Copyright © 2016-" + DateTime.Now.Year + " Simon Mourier. All rights reserved."); Console.WriteLine(); if (CommandLine.HelpRequested || args.Length < 1) { Help(); return; } var traces = CommandLine.GetArgument("traces", false); Console.CancelKeyPress += (sender, e) => e.Cancel = true; string path = Path.GetFullPath(args[0]); Console.WriteLine("Path: " + path); Console.WriteLine(); var shell = new InteractiveShell(); if (traces) { shell.Logger = new ConsoleLogger(true); } shell.Run(path); Console.WriteLine(); Console.WriteLine("Exited."); }
static void RealWorlExampleMain() { Console.WriteLine("Real world example"); InteractiveShell interactiveShell = new InteractiveShell(); interactiveShell.Run(); }