internal PipelineBuilder(IAmASubscriberRegistry registry, IAmAHandlerFactory handlerFactory, ILog logger)
 {
     this.handlerFactory = handlerFactory;
     this.logger         = logger;
     instanceScope       = new LifetimeScope(handlerFactory);
     interpreter         = new Interpreter <TRequest>(registry, handlerFactory);
 }
Ejemplo n.º 2
0
 public PipelineBuilder(IAmASubscriberRegistry registry, IAmAHandlerFactoryAsync asyncHandlerFactory, ILog logger)
 {
     _asyncHandlerFactory = asyncHandlerFactory;
     _logger        = logger;
     _instanceScope = new LifetimeScope(asyncHandlerFactory);
     _interpreter   = new Interpreter <TRequest>(registry, asyncHandlerFactory);
 }
Ejemplo n.º 3
0
        /// <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);
            }
        }
Ejemplo n.º 4
0
 public PipelineBuilder(
     IAmASubscriberRegistry registry,
     IAmAHandlerFactoryAsync asyncHandlerFactory,
     InboxConfiguration inboxConfiguration = null)
 {
     _asyncHandlerFactory = asyncHandlerFactory;
     _inboxConfiguration  = inboxConfiguration;
     _instanceScope       = new LifetimeScope(asyncHandlerFactory);
     _interpreter         = new Interpreter <TRequest>(registry, asyncHandlerFactory);
 }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
        /// <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);
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Adds to lifetime.
 /// </summary>
 /// <param name="instanceScope">The instance scope.</param>
 public void AddToLifetime(IAmALifetime instanceScope)
 {
     instanceScope.Add(this);
     _successor?.AddToLifetime(instanceScope);
 }
Ejemplo n.º 8
0
 public PipelineBuilder(IAmASubscriberRegistry registry, IAmAHandlerFactory handlerFactory)
 {
     _handlerFactory = handlerFactory;
     _instanceScope  = new LifetimeScope(handlerFactory);
     _interpreter    = new Interpreter <TRequest>(registry, handlerFactory);
 }