private static Solution HandleCustomSolution(IEnumerable<string> directories) { var stepManager = new StepManager(); var pathHelper = new PathHelper(directories.Select(Path.GetFullPath)); stepManager.AddStep(new UiStep(pathHelper)); stepManager.AddStep(new ProjectsListStep<ExtensionProject>("Choose extensions libraries:", pathHelper)); stepManager.AddStep(new PluginStep("Choose plugins:", pathHelper)); stepManager.AddStep(new ProjectsListStep<TestsProject>("Choose tests:", pathHelper)); stepManager.AddStep(new ProjectsListStep<UnknownProject>("Choose other projects:", pathHelper)); stepManager.Run(); return stepManager.IsCancelled ? null : SolutionGenerator.Generate(stepManager.GetStep<UiStep>().UIProject, stepManager.GetSteps<ProjectsListStep>().SelectMany(x => x.AdditionalProjects).Union(stepManager.GetStep<UiStep>().UIProject.GetAllReferences())); }
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); }
public long AddStep(StepObject step) { try { return(_stepManager.AddStep(step)); } catch (Exception ex) { ErrorLogger.LoggError(ex.StackTrace, ex.Source, ex.Message); return(0); } }