private static Configuration HandleCustomSolution(string outputPath, bool generateEntryProject, IEnumerable<string> directories) { var stepManager = new StepManager(); var pathHelper = new PathHelper(directories.Select(Path.GetFullPath)); var uiSelectionStep = new UiStep(pathHelper); var robotTestsStep = new RobotTestsStep("Choose robot tests:", pathHelper); stepManager .AddStep(uiSelectionStep) .AddStep(new ProjectsListStep<CpuCoreProject>("Choose supported architectures:", pathHelper)) .AddStep(new ProjectsListStep<ExtensionProject>("Choose extensions libraries:", pathHelper)) .AddStep(new PluginStep("Choose plugins:", pathHelper)) .AddStep(new ProjectsListStep<TestsProject>("Choose tests:", pathHelper)) .AddStep(robotTestsStep) .AddStep(new ProjectsListStep<UnknownProject>("Choose other projects:", pathHelper)) .Run(); if(stepManager.IsCancelled) { return null; } return new Configuration( SolutionGenerator.Generate(uiSelectionStep.UIProject, generateEntryProject, outputPath, stepManager.GetSteps<ProjectsListStep>().SelectMany(x => x.AdditionalProjects).Union(uiSelectionStep.UIProject.GetAllReferences())), robotTestsStep.SelectedTests); }
private static Configuration HandleCustomSolution(Options options) { var stepManager = new StepManager(); var pathHelper = new PathHelper(options.Directories.Select(Path.GetFullPath)); var uiSelectionStep = new UiStep(pathHelper); var robotTestsStep = new RobotTestsStep("Choose robot tests:", pathHelper); stepManager .AddStep(uiSelectionStep) .AddStep(new ProjectsListStep <CpuCoreProject>("Choose supported architectures:", pathHelper)) .AddStep(new ProjectsListStep <ExtensionProject>("Choose extensions libraries:", pathHelper)) .AddStep(new PluginStep("Choose plugins:", pathHelper)) .AddStep(new ProjectsListStep <TestsProject>("Choose tests:", pathHelper)) .AddStep(robotTestsStep) .AddStep(new ProjectsListStep <UnknownProject>("Choose other projects:", pathHelper)) .Run(); if (stepManager.IsCancelled) { return(null); } return(new Configuration( SolutionGenerator.Generate(options.SolutionName, uiSelectionStep.UIProject, options.GenerateEntryProject, options.OutputDirectory, stepManager.GetSteps <ProjectsListStep>().SelectMany(x => x.AdditionalProjects).Union(uiSelectionStep.UIProject.GetAllReferences())), robotTestsStep.SelectedTests)); }