public static int Main(string[] args) { //args = "genmap -l Analise -w 20 -h 20 -n 100".Split(' '); // args = "batch -a 0 -h 0 -n 4 -m 1 -c 1 -f 0 -l Analise".Split(' '); #if DEBUG //Console.WriteLine("Waiting for attach process"); //Console.Read(); #endif return(Parser.Default .ParseArguments < MapGenerationOption, MapViewerOption, FinderOption, GAFinderOption, BatchOption >(args) .MapResult( (MapGenerationOption opt) => MapGenerationCommand.RunMapGeneration(opt), (MapViewerOption opt) => MapViewerCommand.RunMapViewer(opt), (FinderOption opt) => FinderCommand.RunMapFinder(opt), (GAFinderOption opt) => FinderCommand.RunGAMapFinder(opt), (BatchOption opt) => BatchCommand.RunBatch(opt), errs => 1 )); }
internal void WriteNewSchemaVersion(string appVersion) { var updateSchemaVersion = string.Format("UPDATE dbo.Configuration SET ConfigValue = N'{0}' WHERE ConfigKey = N'Version'", appVersion); BatchCommand.RunBatch(updateSchemaVersion); }
public void UpdateByBatch() { var upgradeScript = File.ReadAllText(_filename); var batches = upgradeScript.Split(new[] { "GO" + Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); foreach (var batch in batches) { BatchCommand.RunBatch(batch); } }