public DeploymentDialogViewModel(IServiceProvider services, string projectName, string directoryOfProjectToDeploy, string targetFrameworkMoniker) : base(services) { _errorDialogService = services.GetRequiredService <IErrorDialog>(); TasExplorerViewModel = services.GetRequiredService <ITasExplorerViewModel>(); OutputView = ViewLocatorService.GetViewByViewModelName(nameof(ViewModels.OutputViewModel)) as IView; OutputViewModel = OutputView?.ViewModel as IOutputViewModel; DeploymentInProgress = false; PathToProjectRootDir = directoryOfProjectToDeploy; SelectedBuildpacks = new ObservableCollection <string>(); if (targetFrameworkMoniker.StartsWith(FullFrameworkTFM)) { _fullFrameworkDeployment = true; } CfInstanceOptions = new List <CloudFoundryInstance>(); CfOrgOptions = new List <CloudFoundryOrganization>(); CfSpaceOptions = new List <CloudFoundrySpace>(); BuildpackOptions = new List <BuildpackListItem>(); StackOptions = new List <string>(); DeploymentDirectoryPath = null; ManifestModel = new AppManifest { Version = 1, Applications = new List <AppConfig> { new AppConfig { Name = projectName, Buildpacks = new List <string>(), } } }; SetManifestIfDefaultExists(); if (TasExplorerViewModel.TasConnection != null) { TargetName = TasExplorerViewModel.TasConnection.DisplayText; IsLoggedIn = true; ThreadingService.StartTask(UpdateCfOrgOptions); ThreadingService.StartTask(UpdateBuildpackOptions); ThreadingService.StartTask(UpdateStackOptions); } _projectName = projectName; Expanded = false; }
public DeploymentDialogViewModel(IServiceProvider services, string directoryOfProjectToDeploy) : base(services) { IView outputView = ViewLocatorService.NavigateTo(nameof(OutputViewModel)) as IView; outputViewModel = outputView?.ViewModel as IOutputViewModel; DeploymentStatus = initialStatus; DeploymentInProgress = false; SelectedCf = null; projDir = directoryOfProjectToDeploy; UpdateCfInstanceOptions(); }
public void OpenCloudExplorer(object arg) { ActiveView = ViewLocatorService.NavigateTo(typeof(CloudExplorerViewModel).Name); }