public Pipeline(IServiceProvider builder, PipelineModifications pipelineModifications) { var coordinator = new StepRegistrationsCoordinator(pipelineModifications.Replacements, pipelineModifications.AdditionsOrReplacements); foreach (var rego in pipelineModifications.Additions) { coordinator.Register(rego); } // Important to keep a reference behaviors = coordinator.BuildPipelineModelFor <TContext>() .Select(r => r.CreateBehavior(builder)).ToArray(); List <Expression> expressions = null; if (Logger.IsDebugEnabled) { expressions = new List <Expression>(); } pipeline = behaviors.CreatePipelineExecutionFuncFor <TContext>(expressions); if (Logger.IsDebugEnabled) { Logger.Debug(expressions.PrettyPrint()); } }
public Pipeline(IBuilder builder, ReadOnlySettings settings, PipelineModifications pipelineModifications) { var coordinator = new StepRegistrationsCoordinator(pipelineModifications.Removals, pipelineModifications.Replacements); foreach (var rego in pipelineModifications.Additions.Where(x => x.IsEnabled(settings))) { coordinator.Register(rego); } // Important to keep a reference behaviors = coordinator.BuildPipelineModelFor <TContext>() .Select(r => r.CreateBehavior(builder)).ToArray(); pipeline = behaviors.CreatePipelineExecutionFuncFor <TContext>(); }
public Pipeline(IServiceProvider builder, PipelineModifications pipelineModifications) { var coordinator = new StepRegistrationsCoordinator(pipelineModifications.Replacements, pipelineModifications.AdditionsOrReplacements); foreach (var rego in pipelineModifications.Additions) { coordinator.Register(rego); } // Important to keep a reference behaviors = coordinator.BuildPipelineModelFor <TContext>() .Select(r => r.CreateBehavior(builder)).ToArray(); pipeline = behaviors.CreatePipelineExecutionFuncFor <TContext>(); }