Beispiel #1
0
        public IEnumerable <MissingTemplate> Validate(ITemplateLibrary templates)
        {
            IEnumerable <MissingTemplate> solutionErrors = templates.Validate(TemplateType.Solution, this._templates.ToArray <string>());
            IEnumerable <MissingTemplate> projectErrors  = templates.Validate(TemplateType.Project, (from x in this._projects
                                                                                                     select x.Template).ToArray <string>());
            IEnumerable <MissingTemplate> alterationErrors = templates.Validate(TemplateType.Alteration, this._projects.SelectMany((ProjectRequest x) => x.Alterations).ToArray <string>());
            IEnumerable <MissingTemplate> testingErrors    = templates.Validate(TemplateType.Project, (from x in this._testingProjects
                                                                                                       select x.Template).ToArray <string>());
            IEnumerable <MissingTemplate> testingAlterationErrors = templates.Validate(TemplateType.Alteration, this._testingProjects.SelectMany((ProjectRequest x) => x.Alterations).ToArray <string>());

            return(solutionErrors.Union(projectErrors).Union(alterationErrors).Union(testingErrors).Union(testingAlterationErrors));
        }
Beispiel #2
0
        public IEnumerable <MissingTemplate> Validate(ITemplateLibrary templates)
        {
            var solutionErrors   = templates.Validate(TemplateType.Solution, _templates.ToArray());
            var projectErrors    = templates.Validate(TemplateType.Project, _projects.Select(x => x.Template).ToArray());
            var alterationErrors = templates.Validate(TemplateType.Alteration,
                                                      _projects.SelectMany(x => x.Alterations).ToArray());

            var testingErrors = templates.Validate(TemplateType.Project,
                                                   _testingProjects.Select(x => x.Template).ToArray());

            var testingAlterationErrors = templates.Validate(TemplateType.Alteration,
                                                             _testingProjects.SelectMany(x => x.Alterations).ToArray());



            return(solutionErrors
                   .Union(projectErrors)
                   .Union(alterationErrors)
                   .Union(testingErrors)
                   .Union(testingAlterationErrors));
        }
        public IEnumerable<MissingTemplate> Validate(ITemplateLibrary templates)
        {
            var solutionErrors = templates.Validate(TemplateType.Solution, _templates.ToArray());
            var projectErrors = templates.Validate(TemplateType.Project, _projects.Select(x => x.Template).ToArray());
            var alterationErrors = templates.Validate(TemplateType.Alteration,
                                                      _projects.SelectMany(x => x.Alterations).ToArray());

            var testingErrors = templates.Validate(TemplateType.Project,
                                                   _testingProjects.Select(x => x.Template).ToArray());

            var testingAlterationErrors = templates.Validate(TemplateType.Alteration,
                                                             _testingProjects.SelectMany(x => x.Alterations).ToArray());

            return solutionErrors
                .Union(projectErrors)
                .Union(alterationErrors)
                .Union(testingErrors)
                .Union(testingAlterationErrors);
        }