public static int Run(string[] args) { var cmd = args[0]; try { switch (cmd) { case "connectionString": ConnectionStringCommand.Run(); break; case "testMigrate": TestMigrateCommand.Run(); break; case "-h": case "--help": Help(); break; default: Help(); return(1); } } catch (Exception e) { Console.Error.WriteLine(e.Message); Console.Error.WriteLine(e.StackTrace); return(1); } return(0); }
public static int Run(string[] args) { var cmd = args[0]; try { switch (cmd) { case "connectionString": ConnectionStringCommand.Run(); break; case "testMigrate": TestMigrateCommand.Run(); break; case "testPerformance": if (args.Length != 4) { goto default; } TestPerformanceCommand.Run(int.Parse(args[1]), int.Parse(args[2]), int.Parse(args[3])); break; case "-h": case "--help": Help(); break; default: Help(); return(1); } } catch (Exception e) { Console.Error.WriteLine(e.Message); Console.Error.WriteLine(e.StackTrace); return(1); } return(0); }