static void Main(string[] args) { try { switch (args[0]) { case "install": InstallArgs installArgs = new InstallArgs(args); InstallProcess installProcess = new InstallProcess(); installProcess.Execute(installArgs); break; case "delete": DeleteArgs deleteArgs = new DeleteArgs(args); DeleteProcess deleteProcess = new DeleteProcess(); deleteProcess.Execute(deleteArgs); break; default: System.Console.WriteLine("No Command Found"); break; } } catch (Exception e) { System.Console.WriteLine("Error occured starting pipeline " + e); } }
static void Main(string[] args) { switch (args[0]) { case "install": InstallArgs installArgs = new InstallArgs(args); InstallProcess installProcess = new InstallProcess(); installProcess.Execute(installArgs); break; case "delete": DeleteArgs deleteArgs = new DeleteArgs(args); DeleteProcess deleteProcess = new DeleteProcess(); deleteProcess.Execute(deleteArgs); break; } }
public bool Execute(DeleteArgs args) { try { System.Console.WriteLine("SIM: Starting Delete"); InstanceManager.Initialize(args.InstanceDirectory); var instance = InstanceManager.GetInstance(args.InstanceName); if (instance == null) { System.Console.WriteLine("SIM: Warning! Can't detect installed instance {0}", args.InstanceName); return(true); } var deleteArgs = new SIM.Pipelines.Delete.DeleteArgs(instance, new SqlConnectionStringBuilder(args.ConnectionString)); IPipelineController controller = new ConsoleController(); PipelineManager.Initialize(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, PipelineManager.PipelinesConfigFilePath)); PipelineManager.StartPipeline( "delete", deleteArgs, controller, false); System.Console.WriteLine("SIM: Finished Delete"); return(true); } catch (Exception ex) { System.Console.WriteLine("Sitecore SIM install failed", ex); return(false); } }
public bool Execute(DeleteArgs args) { try { System.Console.WriteLine("SIM: Starting Delete"); InstanceManager.Initialize(args.InstanceDirectory); var instance = InstanceManager.GetInstance(args.InstanceName); if (instance == null) { System.Console.WriteLine("SIM: Warning! Can't detect installed instance {0}", args.InstanceName); return true; } SIM.Pipelines.Delete.DeleteArgs deleteArgs = new SIM.Pipelines.Delete.DeleteArgs(instance, new SqlConnectionStringBuilder(args.ConnectionString)); IPipelineController controller = new ConsoleController(); PipelineManager.Initialize(); PipelineManager.StartPipeline( "delete", deleteArgs, controller, false); System.Console.WriteLine("SIM: Finished Delete"); return true; } catch (Exception ex) { System.Console.WriteLine("Sitecore SIM install failed", ex); return false; } }