Exemplo n.º 1
0
 private void applyTestingTemplates(TemplateRequest request, TemplatePlan plan)
 {
     GenericEnumerableExtensions.Each <ProjectRequest>(request.TestingProjects, delegate(ProjectRequest proj)
     {
         this.buildProjectPlan(plan, proj);
         plan.Add(new CopyProjectReferences(proj.OriginalProject));
     });
 }
Exemplo n.º 2
0
        private static void determineSolutionFileHandling(TemplateRequest request, TemplatePlan plan)
        {
            string sourceDirectory = plan.SourceDirectory;
            string expectedFile    = FubuCore.StringExtensions.AppendPath(sourceDirectory, new string[]
            {
                request.SolutionName
            });

            if (Path.GetExtension(expectedFile) != ".sln")
            {
                expectedFile += ".sln";
            }
            if (File.Exists(expectedFile))
            {
                plan.Add(new ReadSolution(expectedFile));
                return;
            }
            plan.Add(new CreateSolution(request.SolutionName)
            {
                Version = request.Version
            });
        }
Exemplo n.º 3
0
        private void buildProjectPlan(TemplatePlan plan, ProjectRequest proj)
        {
            ProjectPlan projectPlan = new ProjectPlan(proj.Name)
            {
                DotNetVersion = (proj.Version ?? DotNetVersion.V40)
            };

            plan.Add(projectPlan);
            proj.Substitutions.CopyTo(projectPlan.Substitutions);
            ProjectPlanner planner = new ProjectPlanner();

            if (FubuCore.StringExtensions.IsNotEmpty(proj.Template))
            {
                planner.CreatePlan(this._library.Find(TemplateType.Project, proj.Template), plan);
            }
            GenericEnumerableExtensions.Each <Template>(this._library.Find(TemplateType.Alteration, proj.Alterations), delegate(Template template)
            {
                planner.CreatePlan(template, plan);
            });
        }