Example #1
0
 protected ElasticsearchInstallationTaskBase(string[] args, ISession session, bool installationInProgress = true)
     : this(ElasticsearchInstallationModel.Create(
                new WixStateProvider(Product.Elasticsearch, Guid.Parse(session.Get <string>("ProductCode")), installationInProgress), session, args), session, new FileSystem()
            )
 {
     this.Args = args;
 }
Example #2
0
        public void Application_Startup(object sender, StartupEventArgs e)
        {
            var wix   = new WixStateProvider(Product.Elasticsearch, "5.5.1");
            var model = ElasticsearchInstallationModel.Create(wix, NoopSession.Elasticsearch);

            var window = new MainWindow(model, new ManualResetEvent(false));

            model.InstallUITask = async() =>
            {
                await Task.Delay(TimeSpan.FromSeconds(1));

                return(Observable.Return(ClosingResult.Success));
            };
            model.AllSteps.Last().IsSelected = true;
            window.Show();

            RxApp.MainThreadScheduler = new DispatcherScheduler(Application.Current.Dispatcher);
            Application.Current.Resources["InstallerTitle"] = wix.CurrentVersion.ToString();
        }
Example #3
0
        private IEmbeddedWindow GetMainWindow(string product, IWixStateProvider wixState, ISession session)
        {
            switch (product)
            {
            case "elasticsearch":
            {
                var model  = ElasticsearchInstallationModel.Create(wixState, session);
                var window = new Elasticsearch.MainWindow(model, this._installStartEvent);
                return(window);
            }

            case "kibana":
            {
                var model  = KibanaInstallationModel.Create(wixState, session);
                var window = new Kibana.MainWindow(model, this._installStartEvent);
                return(window);
            }

            default:
                throw new Exception($"Unknown product name {product}");
            }
        }
Example #4
0
 protected ElasticsearchInstallationTask(string[] args, ISession session)
     : this(ElasticsearchInstallationModel.Create(new NoopWixStateProvider(), session, args), session, new FileSystem())
 {
     this.Args = args;
 }