public TestOrderSubmitterFunctions(JsonSerializer jsonSerializer,
                                    CommandRetryThresholds retryThresholds,
                                    IClock clock,
                                    IOrderSubmitter orderSubmitter,
                                    ICommandPublisher <SubmitOrderForProduction> submitOrderForProductionPublisher,
                                    ICommandPublisher <NotifyOfFatalFailure> notifyOfFatalFailurePublisher,
                                    IEventPublisher <EventBase> eventPublisher,
                                    ILogger logger,
                                    IDisposable lifetimeScope) : base(jsonSerializer, retryThresholds, clock, orderSubmitter, submitOrderForProductionPublisher, notifyOfFatalFailurePublisher, eventPublisher, logger, lifetimeScope)
 {
 }
Exemplo n.º 2
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="NotifierFunctions"/> class.
        /// </summary>
        ///
        /// <param name="jsonSerializer">The JSON serializer to use for parsing messages from the queue.</param>
        /// <param name="retryThresholds">The thresholds for use when retrying commands on a backoff policy.</param>
        /// <param name="clock">The clock to use for time-realated operations.</param>
        /// <param name="orderSubmitter">The submitter to use for the order associated with a SubmitOrderForProduction command,</param>
        /// <param name="submitOrderForProductionPublisher">The publisher to use for sending of the <see cref="SubmitOrderForProduction" /> command</param>
        /// <param name="notifyOfFatalFailurePublisher">The publisher to use for sending of the <see cref="NotifyOfFatalFailure" /> command.</param>
        /// <param name="eventPublisher">The publisher to use for the sending of events.</param>
        /// <param name="logger">The logger to be used for emitting telemetry from the controller.</param>
        /// <param name="lifetimeScope">The lifetime scope associated with the class; this will be disposed when the class is by the base class.</param>
        ///
        public OrderSubmitterFunctions(JsonSerializer jsonSerializer,
                                       CommandRetryThresholds retryThresholds,
                                       IClock clock,
                                       IOrderSubmitter orderSubmitter,
                                       ICommandPublisher <SubmitOrderForProduction> submitOrderForProductionPublisher,
                                       ICommandPublisher <NotifyOfFatalFailure> notifyOfFatalFailurePublisher,
                                       IEventPublisher <EventBase> eventPublisher,
                                       ILogger logger,
                                       IDisposable lifetimeScope) : base(lifetimeScope)
        {
            this.jsonSerializer  = jsonSerializer ?? throw new ArgumentNullException(nameof(jsonSerializer));
            this.retryThresholds = retryThresholds ?? throw new ArgumentNullException(nameof(retryThresholds));
            this.clock           = clock ?? throw new ArgumentNullException(nameof(clock));
            this.orderSubmitter  = orderSubmitter ?? throw new ArgumentNullException(nameof(orderSubmitter));
            this.submitOrderForProductionPublisher = submitOrderForProductionPublisher ?? throw new ArgumentNullException(nameof(submitOrderForProductionPublisher));
            this.notifyOfFatalFailurePublisher     = notifyOfFatalFailurePublisher ?? throw new ArgumentNullException(nameof(notifyOfFatalFailurePublisher));
            this.eventPublisher = eventPublisher ?? throw new ArgumentNullException(nameof(eventPublisher));
            this.Log            = logger ?? throw new ArgumentNullException(nameof(logger));

            this.rng = new Random();
        }
Exemplo n.º 3
0
 public CartController (IProductsRepository productsRepository,
                        IOrderSubmitter orderSubmitter)
 {
     this.productsRepository = productsRepository;
     this.orderSubmitter = orderSubmitter;
 }
Exemplo n.º 4
0
 public CartController(IProductsRepository productsRepository, IOrderSubmitter orderSubmitter)
 {
     this.productsRepository = productsRepository;
     this.orderSubmitter     = orderSubmitter;
 }
Exemplo n.º 5
0
 public CartController(IProductsRepository productsRepository, IOrderSubmitter orderSubmitter, ICreditCardProcessor creditCardProcessor)
 {
     this.productsRepository  = productsRepository;
     this.orderSubmitter      = orderSubmitter;
     this.creditCardProcessor = creditCardProcessor;
 }
Exemplo n.º 6
0
 public AccountController(IOrderSubmitter orderSubmitter)
 {
     this.orderSubmitter = orderSubmitter;
 }
Exemplo n.º 7
0
 public CartController(IOrderSubmitter orderSubmitter, ChocoPlanetDbEntities chocoPlanetDbEntities)
 {
     _orderSubmitter = orderSubmitter;
     
     this.chocoPlanetDbEntities = chocoPlanetDbEntities;
 }
Exemplo n.º 8
0
 public CartController(IProductsRepository repo, IOrderSubmitter orderSubmitter)
 {
     _productsRepository = repo;
     _orderSubmitter     = orderSubmitter;
 }
Exemplo n.º 9
0
 public CartController(IMenuItemsRepository menuItemsRepository, IOrderSubmitter orderSubmitter)
 {
     this.menuItemsRepository = menuItemsRepository;
     this.orderSubmitter = orderSubmitter;
 }
Exemplo n.º 10
0
 public CartController(IProductsRepository repo, IOrderSubmitter orderSubmitter)
 {
     _productsRepository = repo;
     _orderSubmitter = orderSubmitter;
 }
Exemplo n.º 11
0
 public AccountController(IOrderSubmitter orderSubmitter)
 {
     this.orderSubmitter = orderSubmitter;
 }
Exemplo n.º 12
0
 public CartController(IMenuItemsRepository menuItemsRepository, IOrderSubmitter orderSubmitter)
 {
     this.menuItemsRepository = menuItemsRepository;
     this.orderSubmitter      = orderSubmitter;
 }
Exemplo n.º 13
0
        public CartController(IOrderSubmitter orderSubmitter, ChocoPlanetDbEntities chocoPlanetDbEntities)
        {
            _orderSubmitter = orderSubmitter;

            this.chocoPlanetDbEntities = chocoPlanetDbEntities;
        }