예제 #1
0
 public ValidationWorker(IOrderStore orderStore, IAccountStore accountStore,
                         IChallangeValidatorFactory challangeValidatorFactory)
 {
     _orderStore   = orderStore;
     _accountStore = accountStore;
     _challangeValidatorFactory = challangeValidatorFactory;
 }
        public UncloseOrderWatcher(OrderContext orderContext,
                                   QuotationContext qutationContext, IOrderStore store,
                                   IPricePolicyStore pricePolicyStore, OrderServiceBuilder builder, OrderNotifyManager orderNotifyer)
        {
            if (orderContext == null)
            {
                throw new ArgumentNullException(nameof(orderContext));
            }
            if (qutationContext == null)
            {
                throw new ArgumentNullException(nameof(qutationContext));
            }
            if (store == null)
            {
                throw new ArgumentNullException(nameof(store));
            }
            if (pricePolicyStore == null)
            {
                throw new ArgumentNullException(nameof(pricePolicyStore));
            }
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            _orderContext     = orderContext;
            _qutationContext  = qutationContext;
            _store            = store;
            _pricePolicyStore = pricePolicyStore;
            _builder          = builder;
            _orderNotifyer    = orderNotifyer;

            DefaultClosePricePolicy = new RealTimeCloseOpenPricePolicy();
        }
예제 #3
0
 /// <summary>
 /// Populate the product test data
 /// </summary>
 /// <param name="orderStore">
 /// The <see cref="IOrderStore{TOrder}"/> instance
 /// </param>
 public static async void Seed(this IOrderStore <Order> orderStore)
 {
     foreach (var order in TestData.Orders)
     {
         await orderStore.AddAsync(order);
     }
 }
예제 #4
0
        /// <summary>
        /// 设置订单存储存储提供实现
        /// </summary>
        /// <param name="orderStore">订单存储存储提供实现</param>
        public void SetOrderStore(IOrderStore orderStore)
        {
            if (orderStore == null)
            {
                throw new ArgumentNullException("orderStore");
            }

            _orderStore = orderStore;
        }
 /// <summary>
 /// Initialise a new <see cref="OrderController"/> instance
 /// </summary>
 /// <param name="orderStore">
 /// The order store dependancy
 /// </param>
 /// <param name="processOrder">
 /// The process order action dependancy
 /// </param>
 /// <param name="addItemsToOrder">
 /// The add items to order action dependancy
 /// </param>
 /// <param name="removeItemsFromOrder">
 /// The remove items from order action dependancy
 /// </param>
 /// <param name="clearOrder">
 /// The clear order action dependancy
 /// </param>
 public OrderController(IOrderStore <Order> orderStore,
                        IProcessOrder processOrder,
                        IAddItemsToOrder addItemsToOrder,
                        IRemoveItemsFromOrder removeItemsFromOrder,
                        IClearOrder clearOrder)
 {
     this.orderStore           = orderStore;
     this.processOrder         = processOrder;
     this.addItemsToOrder      = addItemsToOrder;
     this.removeItemsFromOrder = removeItemsFromOrder;
     this.clearOrder           = clearOrder;
 }
예제 #6
0
        /// <summary>
        /// </summary>
        /// <param name="orderContext"></param>
        /// <param name="qutationContext"></param>
        /// <param name="orderStore"></param>
        /// <param name="orderPolicyStore"></param>
        /// <param name="pricePolicyStore"></param>
        /// <param name="generator"></param>
        /// <param name="notify"></param>
        /// <param name="logger"></param>
        public OrderService(OrderContext orderContext, QuotationContext qutationContext, IOrderStore orderStore,
                            IOrderPolicyStore orderPolicyStore, IPricePolicyStore pricePolicyStore,
                            IOrderIdGenerator generator, IOrderNotify notify, ILogger <OrderService> logger)
        {
            if (orderContext == null)
            {
                throw new ArgumentNullException(nameof(orderContext));
            }
            if (qutationContext == null)
            {
                throw new ArgumentNullException(nameof(qutationContext));
            }
            if (orderStore == null)
            {
                throw new ArgumentNullException(nameof(orderStore));
            }
            if (generator == null)
            {
                throw new ArgumentNullException(nameof(generator));
            }
            if (notify == null)
            {
                throw new ArgumentNullException(nameof(notify));
            }
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            _orderContext     = orderContext;
            _qutationContext  = qutationContext;
            _orderStore       = orderStore;
            _orderPolicyStore = orderPolicyStore;
            _pricePolicyStore = pricePolicyStore;


            _orderIdGenerator          = generator;
            _notify                    = notify;
            _logger                    = logger;
            DefaultOpenOpenPricePolicy = new RealTimeOpenPricePolicy();
        }
예제 #7
0
 public OrderManager(IOrderStore orderStore)
 {
     _orderStore = orderStore;
 }
예제 #8
0
 public OrderController(IOrderStore orderStore, IOrderService orderService, IHttpContextAccessor httpContextAccessor)
 {
     _orderStore               = orderStore;
     _orderService             = orderService;
     this._httpContextAccessor = httpContextAccessor;
 }
 public HomeController(IOrderStore orderStore)
 {
     _orderStore = orderStore;
 }
예제 #10
0
 public Cashier(IHandleOrders handler, IOrderStore orderStore)
 {
     _handler = handler;
     _orderStore = orderStore;
 }
예제 #11
0
 public IssuanceWorker(IOrderStore orderStore, ICertificateIssuer issuer)
 {
     _orderStore = orderStore;
     _issuer     = issuer;
 }
예제 #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderService"/> class.
 /// </summary>
 /// <param name="orderStore">The order store.</param>
 public OrderService(IOrderStore orderStore)
 {
     this._orderStore = orderStore;
 }
예제 #13
0
 public IndexManager(IIndexStore indexStore, IOrderStore orderStore)
 {
     _indexStore = indexStore;
     _orderStore = orderStore;
 }
예제 #14
0
 public SmallOrderManager(IOrderStore orderStore, IOrderWriter orderWriter)
     : base(orderStore, orderWriter)
 {
 }
 /// <summary>
 /// Initialise a new <see cref="DefaultClearOrder"/> instance
 /// </summary>
 /// <param name="orderStore">
 /// The <see cref="IOrderStore{TOrder}"/> dependancy
 /// </param>
 /// <param name="itemStore">
 /// The <see cref="IItemStore{TItem}"/> dependancy
 /// </param>
 public DefaultClearOrder(IOrderStore <Order> orderStore, IItemStore <Item> itemStore)
 {
     this.orderStore = orderStore;
     this.itemStore  = itemStore;
 }
예제 #16
0
 public DefaultOrderService(IOrderStore orderStore, IAuthorizationFactory authorizationFactory, ICsrValidator csrValidator)
 {
     _orderStore           = orderStore;
     _authorizationFactory = authorizationFactory;
     _csrValidator         = csrValidator;
 }
예제 #17
0
 public OrderManager(IOrderStore orderStore, IOrderWriter orderWriter)
 {
     _orderStore  = orderStore;
     _orderWriter = orderWriter;
 }