コード例 #1
0
    private static IReadOnlyCollection <IReadOnlyCollection <string> > GetStageAndBuildNameGroups(ConditionedList <Stage> stages)
    {
        var stageNames = stages
                         .SelectMany(s => s.FlattenDefinitions())
                         .Select(s => s.Name)
                         .ToList();

        // For each stage, get its job names
        var jobNames = stages
                       .SelectMany(s => s.FlattenDefinitions()
                                   .Select(s => s.Jobs.SelectMany(j => j.FlattenDefinitions().Select(k => k.Name)).ToList()));

        return(jobNames.Prepend(stageNames).ToList());
    }
コード例 #2
0
 public static IEnumerable <JobBase> GetJobs(this ConditionedList <Stage> stages)
 => stages.SelectMany(s => s.FlattenDefinitions().SelectMany(r => r.Jobs.SelectMany(j => j.FlattenDefinitions())));
コード例 #3
0
 public JobDependsOnValidation(ConditionedList <JobBase> jobs)
     : base()
 {
     _jobs = jobs.SelectMany(s => s.FlattenDefinitions()).ToList();
 }
コード例 #4
0
 public NameValidation(ConditionedList <JobBase> jobs)
     : this(new[] { jobs.SelectMany(j => j.FlattenDefinitions()).Select(s => s.Name).ToList() })
 {
 }
コード例 #5
0
 public StageDependsOnValidation(ConditionedList <Stage> stages)
     : base()
 {
     _stages = stages.SelectMany(s => s.FlattenDefinitions()).ToList();
 }