public SolutionModeConfigurationDto SaveConfiguration(SolutionModeConfigurationDto configuration)
        {
            _informationPublishingService.Publish(InformationType.Important, $"Saving {configuration.ConfigurationName}...");
            var result = _configurationAppService.SaveConfiguration(configuration);

            _informationPublishingService.Publish(InformationType.Success, $"{configuration.ConfigurationName} saved!");
            return(result);
        }
Exemple #2
0
        public SolutionModeConfigurationDto SaveConfiguration(SolutionModeConfigurationDto configurationDto)
        {
            var config         = _mapper.Map <SolutionModeConfiguration>(configurationDto);
            var returnedConfig = _solutionModeConfigRepository.Save(config);
            var result         = _mapper.Map <SolutionModeConfigurationDto>(returnedConfig);

            return(result);
        }
Exemple #3
0
        public void NavigateToProjectSelection(SolutionModeConfigurationDto configuration)
        {
            var viewModel = _provisioningService.GetService <ProjectSelectionViewModel>();

            var projectsInSolution = _projectSelectionService.LoadProjects(configuration.SolutionFilePath);
            var selectProjects     = _selectProjectDtoMappingHandler.Map(projectsInSolution, configuration);

            viewModel.Initialize(configuration, selectProjects);
            _navigationHandler.NavigateTo(viewModel);
        }
        public void SwitchSolution(SolutionModeConfigurationDto configurationDto)
        {
            _informationPublishingService.Publish(InformationType.Important, "Starting to switch...");
            var configuration = _mapper.Map <SolutionModeConfiguration>(configurationDto);

            _informationPublishingService.Publish(InformationType.Info, "Switching it up...");
            var solutionSwitchResult = _solutionModeSwitchingService.SwitchSolutionMode(configuration);

            SaveSolutionToFile(solutionSwitchResult.SwitchedSolutionConfigFile);
            SaveProjectsToFiles(solutionSwitchResult.SwitchedProjectConfigFiles);

            _informationPublishingService.Publish(InformationType.Success, "Finished!");
        }
        public IReadOnlyCollection <SelectProjectDto> Map(IReadOnlyCollection <ProjectReferenceConfigurationDto> dtos, SolutionModeConfigurationDto configuration)
        {
            var result = new List <SelectProjectDto>();

            foreach (var referenceConfigurationDto in dtos)
            {
                var existsInConfig   = configuration.ProjectReferenceConfigurations.Any(f => f.AssemblyName == referenceConfigurationDto.AssemblyName);
                var selectProjectDto = new SelectProjectDto
                {
                    AssemblyName            = referenceConfigurationDto.AssemblyName,
                    IsSelected              = existsInConfig,
                    AbsoluteProjectFilePath = referenceConfigurationDto.AbsoluteProjectFilePath
                };

                result.Add(selectProjectDto);
            }

            return(result);
        }
Exemple #6
0
        public async Task <IReadOnlyCollection <BuildableProjectVm> > SearchProjectsAsync(SolutionModeConfigurationDto configuration, Func <string, Task> buildRequestedCallback)
        {
            _informationPublishingService.Publish(InformationType.Important, "Searching Projects...");
            var projectDtos = await _projectSearchService.SearchProjectsAsync(configuration);

            var result = projectDtos.Select(f => new BuildableProjectVm(f.FilePath, f.FileName, buildRequestedCallback)).ToList();

            _informationPublishingService.Publish(InformationType.Success, "Searching finished!");
            return(result);
        }
Exemple #7
0
        public async Task <IReadOnlyCollection <BuildableProjectDto> > SearchProjectsAsync(SolutionModeConfigurationDto configurationDto)
        {
            var configuration     = _mapper.Map <SolutionModeConfiguration>(configurationDto);
            var buildableProjects = await _projectSearchService.SearchProjectsAsync(configuration);

            var result = _mapper.Map <List <BuildableProjectDto> >(buildableProjects);

            return(result);
        }