private static int Main(string[] args) { if (Debugger.IsAttached) { ////Test single script //args = new[] { "exec", // "--connections", // @"C:\\Users\\Administrator.WIN-JLVDOKCVKPQ\\Desktop\\TestScripts\\connections.json", // "--connectTo", // "Local Cosmos", // "--script", // @"C:\\Users\\Administrator.WIN-JLVDOKCVKPQ\\Desktop\\TestScripts\\AddDynamicFieldsLocalizations.csql", // "--output", // @"C:\\Users\\Administrator.WIN-JLVDOKCVKPQ\\Desktop\\TestScripts\\output.cresult", // // "--includeDocumentInOutput" // }; ////Test batch scripts //args = new[] { "exec", // "--connections", // @"C:\\Users\\Administrator.WIN-JLVDOKCVKPQ\\Desktop\\TestScripts\\connections.json", // "--connectTo", // "Local Cosmos", // "--folder", // @"C:\\Users\\Administrator.WIN-JLVDOKCVKPQ\\Desktop\\TestScripts\\batch", // "--output", // @"C:\\Users\\Administrator.WIN-JLVDOKCVKPQ\\Desktop\\TestScripts\\output.cresult", // // "--includeDocumentInOutput", // "--continueOnError" // }; } if (args != null && args.Length > 0) { ConsoleHelper.Alloc(Debugger.IsAttached); Bootstrap(true); var intResult = CosmosManagerConfiguration.Create(args, container); //used to hold the process open while debugging locally. if (Debugger.IsAttached) { Console.WriteLine("Press (q) to quit debugging."); while (Console.ReadLine() != "q") { } } return(intResult); } else { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Bootstrap(); Application.Run(container.GetInstance <MainForm>()); return(0); } }