private void DoInstall([NotNull] Action completed)
        {
            Debug.ArgumentNotNull(completed, nameof(completed));

            Install.IsEnabled     = false;
            InstallAll.IsEnabled  = false;
            CloseButton.IsEnabled = false;

            AppHost.DoEvents();

            try
            {
                try
                {
                    var pipeline = UpdateServerPipeline.Run().WithParameters(Updates, DataService, WebRootPath, Site);

                    WebRootPath = pipeline.WebRootPath;

                    if (pipeline.DataService != DataService)
                    {
                        DataService     = pipeline.DataService;
                        Install.Content = Rocks.Resources.Install;
                    }

                    DataService.ResetDataService();
                }
                finally
                {
                    InstallAll.IsEnabled  = true;
                    Install.IsEnabled     = true;
                    CloseButton.IsEnabled = true;
                }
            }
            finally
            {
                Loading.ShowLoading(Server, CheckAll);
            }

            if ((DataService.FeatureCapabilities & DataServiceFeatureCapabilities.Execute) != DataServiceFeatureCapabilities.Execute)
            {
                this.Close(true);
                return;
            }

            var dotNetFrameworkVersion = Site != null ? Site.Connection.DotNetFrameworkVersion : RuntimeVersion.DefaultVersion.ToString();

            InstalledPlugins = UpdateServerComponentsManager.GetInstalledPlugins(WebRootPath, dotNetFrameworkVersion);
            LoadComponents(completed, false);
        }
        public void Initialize([NotNull] DataService dataService, [NotNull] string serverName, [NotNull] string webRootPath, [CanBeNull] Site site, [CanBeNull] Action callback)
        {
            Assert.ArgumentNotNull(dataService, nameof(dataService));
            Assert.ArgumentNotNull(serverName, nameof(serverName));
            Assert.ArgumentNotNull(webRootPath, nameof(webRootPath));

            DataService = dataService;
            WebRootPath = webRootPath;
            Site        = site;

            ServerName.Text = serverName;

            if ((DataService.FeatureCapabilities & DataServiceFeatureCapabilities.Execute) != DataServiceFeatureCapabilities.Execute)
            {
                Install.Content = Rocks.Resources.UpdateServerComponentsDialog_Initialize_Install_and_Close;
                Install.Width   = 100;
            }

            InstalledPlugins = UpdateServerComponentsManager.GetInstalledPlugins(webRootPath);
            LoadComponents(callback, true);
        }
        public override void Initialize([NotNull] Type type)
        {
            Assert.ArgumentNotNull(type, nameof(type));

            UpdateServerComponentsManager.LoadType(type, this);
        }