public List <RegisterStep> BuildPipelineModelFor <TRootContext>() where TRootContext : IBehaviorContext
        {
            var relevantRemovals     = removals.Where(removal => additions.Any(a => a.StepId == removal.RemoveId)).ToList();
            var relevantReplacements = replacements.Where(removal => additions.Any(a => a.StepId == removal.ReplaceId)).ToList();

            var piplineModelBuilder = new PipelineModelBuilder(typeof(TRootContext), additions, relevantRemovals, relevantReplacements);

            return(piplineModelBuilder.Build());
        }
Пример #2
0
        public IList <RegisterStep> BuildPipelineModelFor <TRootContext>() where TRootContext : IBehaviorContext
        {
            var reachableContexts = ContextsReachableFrom <TRootContext>(additions)
                                    .ToList();

            var relevantAdditions    = additions.Where(addition => reachableContexts.Contains(addition.BehaviorType.GetInputContext())).ToList();
            var relevantRemovals     = removals.Where(removal => relevantAdditions.Any(a => a.StepId == removal.RemoveId)).ToList();
            var relevantReplacements = replacements.Where(removal => relevantAdditions.Any(a => a.StepId == removal.ReplaceId)).ToList();


            var piplineModelBuilder = new PipelineModelBuilder(typeof(TRootContext), relevantAdditions, relevantRemovals, relevantReplacements);


            return(piplineModelBuilder.Build());
        }
Пример #3
0
        public List <RegisterStep> BuildPipelineModelFor <TRootContext>() where TRootContext : IBehaviorContext
        {
            var pipelineModelBuilder = new PipelineModelBuilder(typeof(TRootContext), additions, replacements, addOrReplaceSteps);

            return(pipelineModelBuilder.Build());
        }