/// <summary> /// Creates new instance. /// </summary> /// <param name="pipeline">Behavior pipeline.</param> /// <param name="handlerFactory">Inner handler factory.</param> public BehaviorCommandHandler(IPipeline <T> pipeline, IFactory <T> handlerFactory) { Ensure.NotNull(pipeline, "pipeline"); Ensure.NotNull(handlerFactory, "handlerFactory"); this.pipeline = pipeline.AddBehavior(PipelineBehaviorPosition.After, this); this.handlerFactory = handlerFactory; }
public IPipeline <T> AddBehavior(PipelineBehaviorPosition position, IBehavior <T> behavior) { EnsureGeneratedPipeline(); generatedPipeline.AddBehavior(position, behavior); return(this); }