internal PipelineBuilder(IAmASubscriberRegistry registry, IAmAHandlerFactory handlerFactory, ILog logger) { this.handlerFactory = handlerFactory; this.logger = logger; instanceScope = new LifetimeScope(handlerFactory); interpreter = new Interpreter <TRequest>(registry, handlerFactory); }
public PipelineBuilder(IAmASubscriberRegistry registry, IAmAHandlerFactoryAsync asyncHandlerFactory, ILog logger) { _asyncHandlerFactory = asyncHandlerFactory; _logger = logger; _instanceScope = new LifetimeScope(asyncHandlerFactory); _interpreter = new Interpreter <TRequest>(registry, asyncHandlerFactory); }
/// <summary> /// Adds to lifetime. /// </summary> /// <param name="instanceScope">The instance scope.</param> public void AddToLifetime(IAmALifetime instanceScope) { instanceScope.Add(this); if (_successor != null) { _successor.AddToLifetime(instanceScope); } }
public PipelineBuilder( IAmASubscriberRegistry registry, IAmAHandlerFactoryAsync asyncHandlerFactory, InboxConfiguration inboxConfiguration = null) { _asyncHandlerFactory = asyncHandlerFactory; _inboxConfiguration = inboxConfiguration; _instanceScope = new LifetimeScope(asyncHandlerFactory); _interpreter = new Interpreter <TRequest>(registry, asyncHandlerFactory); }
/// <summary> /// Used to build a pipeline of handlers from the target handler and the attributes on that /// target handler which represent other filter steps in the pipeline /// </summary> /// <param name="registry">What handler services this request</param> /// <param name="handlerFactorySync">Callback to the user code to create instances of handlers</param> /// <param name="inboxConfiguration">Do we have a global attribute to add an inbox</param> public PipelineBuilder( IAmASubscriberRegistry registry, IAmAHandlerFactorySync handlerFactorySync, InboxConfiguration inboxConfiguration = null) { _handlerFactorySync = handlerFactorySync; _inboxConfiguration = inboxConfiguration; _instanceScope = new LifetimeScope(handlerFactorySync); _interpreter = new Interpreter <TRequest>(registry, handlerFactorySync); }
/// <summary> /// Adds to lifetime. /// </summary> /// <param name="instanceScope">The instance scope.</param> public void AddToLifetime(IAmALifetime instanceScope) { if (this is IDisposable) { instanceScope.Add(this); } if (successor != null) { successor.AddToLifetime(instanceScope); } }
/// <summary> /// Adds to lifetime. /// </summary> /// <param name="instanceScope">The instance scope.</param> public void AddToLifetime(IAmALifetime instanceScope) { instanceScope.Add(this); _successor?.AddToLifetime(instanceScope); }
public PipelineBuilder(IAmASubscriberRegistry registry, IAmAHandlerFactory handlerFactory) { _handlerFactory = handlerFactory; _instanceScope = new LifetimeScope(handlerFactory); _interpreter = new Interpreter <TRequest>(registry, handlerFactory); }