public RetryingCallback(ICommandCallback @delegate, IRetryScheduler retryScheduler, ICommandBus commandBus)
 {
     _delegate       = @delegate;
     _retryScheduler = retryScheduler;
     _commandBus     = commandBus;
     _history        = new List <Type>();
 }
 public GatewayInvocationHandler(IReadOnlyDictionary <MethodInfo, IInvocationHandler> dispatchers,
                                 ICommandBus commandBus,
                                 IRetryScheduler retryScheduler,
                                 List <IMessageDispatchInterceptor> dispatchInterceptors)
     : base(commandBus, retryScheduler, dispatchInterceptors)
 {
     _dispatchers = dispatchers;
 }
 public DispatchOnInvocationHandler(ICommandBus commandBus, IRetryScheduler retryScheduler,
                                    List <IMessageDispatchInterceptor> messageDispatchInterceptors,
                                    MetaDataExtractor[] metaDataExtractors, // NOSONAR
                                    List <ICommandCallback> commandCallbacks,
                                    bool forceCallbacks)
     : base(commandBus, retryScheduler, messageDispatchInterceptors)
 {
     _metaDataExtractors = metaDataExtractors; // NOSONAR
     _commandCallbacks   = commandCallbacks;
     _forceCallbacks     = forceCallbacks;
 }
Ejemplo n.º 4
0
 protected AbstractCommandGateway(ICommandBus commandBus, IRetryScheduler retryScheduler,
                                  IReadOnlyCollection <IMessageDispatchInterceptor> messageDispatchInterceptors)
 {
     Assert.NotNull(commandBus, () => "commandBus may not be null");
     this.CommandBus = commandBus;
     if (messageDispatchInterceptors != null && messageDispatchInterceptors.Any())
     {
         _dispatchInterceptors = new List <IMessageDispatchInterceptor>(messageDispatchInterceptors);
     }
     else
     {
         _dispatchInterceptors = new List <IMessageDispatchInterceptor>();
     }
     _retryScheduler = retryScheduler;
 }
        private CommandGatewayFactory(ICommandBus commandBus, IRetryScheduler retryScheduler, List <IMessageDispatchInterceptor> messageDispatchInterceptors)
        {
            Assert.NotNull(commandBus, () => "commandBus may not be null");
            _retryScheduler = retryScheduler;
            _commandBus     = commandBus;
            if (messageDispatchInterceptors != null && !messageDispatchInterceptors.IsEmpty())
            {
                _dispatchInterceptors = new List <IMessageDispatchInterceptor>(messageDispatchInterceptors);
            }
            else
            {
                _dispatchInterceptors = new List <IMessageDispatchInterceptor>();
            }

            _commandCallbacks = new List <ICommandCallback>();
        }
 public CommandGatewayFactory(ICommandBus commandBus, IRetryScheduler retryScheduler, params IMessageDispatchInterceptor[] dispatchInterceptors)
     : this(commandBus, retryScheduler, dispatchInterceptors.ToList())
 {
 }
 public DefaultCommandGateway(ICommandBus commandBus, IRetryScheduler retryScheduler, params IMessageDispatchInterceptor[] messageDispatchInterceptors)
     : base(commandBus, retryScheduler, messageDispatchInterceptors)
 {
 }