예제 #1
0
        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));
        }
예제 #2
0
        private static Solution HandleCustomSolution(string outputPath, bool generateEntryProject, IEnumerable <string> directories)
        {
            var stepManager = new StepManager();
            var pathHelper  = new PathHelper(directories.Select(Path.GetFullPath));

            stepManager.AddStep(new UiStep(pathHelper));
            stepManager.AddStep(new ProjectsListStep <CpuCoreProject>("Choose supported architectures:", 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, generateEntryProject, outputPath,
                                                   stepManager.GetSteps <ProjectsListStep>().SelectMany(x => x.AdditionalProjects).Union(stepManager.GetStep <UiStep>().UIProject.GetAllReferences())));
        }