Пример #1
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())));
        }
Пример #2
0
        protected override bool ShouldBeShown(StepManager m)
        {
            var additionalProjects = m.GetPreviousSteps <ProjectsListStep>(this).SelectMany(x => x.AdditionalProjects).Union(m.GetStep <UiStep>().UIProject.GetAllReferences()).ToList();
            var uiProject          = m.GetPreviousSteps <UiStep>(this).First().UIProject;

            ScannedProjects = new HashSet <Project>(Scanner.Instance.Projects.OfType <PluginProject>().Where(x => !x.PluginModes.Any() || x.PluginModes.Contains(uiProject.Name)));
            ScannedProjects.ExceptWith(additionalProjects);
            return(ScannedProjects.Any());
        }