//El constructor va a pedir que le pasen el producto
 public CartController(
     IProductRepository productRepository,
     IOrderProcessor orderProcessor)
 {
     _productRepository = productRepository;
     _orderProcessor = orderProcessor;
 }
 public PracticumInputProcessor(TextReader input, TextWriter output, IOrderProcessor orderProcessor)
 {
     //Error = error;
     Output = output;
     Input = input;
     this.orderProcessor = orderProcessor;
 }
示例#3
0
 public CartController(IProductRepository repository, IOrderProcessor orderProcessor, IAddressCustomerRepository addressCustomerRepository, IUserRepository userRepository, IAddressRepository addressRepository)
 {
     _repository = repository;
     _orderProcessor = orderProcessor;
     _addressCustomerRepository = addressCustomerRepository;
     _userRepository = userRepository;
     _addressRepository = addressRepository;
 }
 public CartController(IProductRepository repo, IOrderRepository orderRepo, IOrderItemRepository orderItemRepo, IOrderProcessor proc, IAddressRepository repoAddress, ICustomerRepository repoCustomer)
 {
     repository = repo;
     orderRepository = orderRepo;
     orderItemRepository = orderItemRepo;
     orderProcessor = proc;
     repositoryAddress = repoAddress;
     repositoryCustomer = repoCustomer;
 }
 public OrderController(IGetProductService getProductService,
     IHttpSession session, IOrderProcessor orderProcessor,
     IGetObjectService<Order> getOrderService,
     ISaveObjectService<Order> saveOrderService)
 {
     _session = session;
     _orderProcessor = orderProcessor;
     _getOrderService = getOrderService;
     _saveOrderService = saveOrderService;
     _getProductService = getProductService;
 }
示例#6
0
 public CheckoutController
     (
         IOrderProcessor orderProcessor,
         IProductRepository product,
         IOrderRepository order,
         IOrderStatusRepository orderStatus,
         IOrderItemRepository orderItem
     )
 {
     _orderProcessor = orderProcessor;
     _product = product;
     _order = order;
     _orderStatus = orderStatus;
     _orderItem = orderItem;
 }
        protected override void Establish_context()
        {
            var productRepository = ObjectFactory.GetInstance<ISaveObjectService<Product>>();
            var orderRepository = ObjectFactory.GetInstance<ISaveObjectService<Order>>();

            var product = new Product { Price = 10, IsActive = true, Name = "foo" };
            productRepository.Create(product);

            _order = new Order
                         {
                             StateCode = "OH",
                             Products = new List<Product> { product }
                         };
            orderRepository.Create(_order);
            _orderProcessor = ObjectFactory.GetInstance<IOrderProcessor>();
        }
        public SimpleOrderProcessorFactory() {
            
            CompositeOrderProcessor refreshProcessor = new CompositeOrderProcessor();
            refreshProcessor.Add(new ItemCodeCondenserCommand());
            /* All of these processors should be configurable via the admin 
                I think we should pass all the processors we want to use in via the constuctor - maybe only useful for delivery and charges tho.
             * Alternatively, have a generic Delivery Processor which call's all the enabled delivery processors.
             *  What happens if a customer has a choice of two delivery methods? Would need to pass in which one is slected and only apply that and remove  all other delivery charges
                At the
             * LC - 29.10.2007
             */
            //refreshProcessor.Add(new SimplePriceProcessor());
            refreshProcessor.Add(new ScaledPriceProcessor());
            refreshProcessor.Add(new WeightBandingOrderProcessor()); 
            refreshProcessor.Add(new MinimumDeliveryChargeOrderProcessor(_minimumDeliveryCharge));
            refreshProcessor.Add(new SubtotalOrderProcessor());
            refreshProcessor.Add(new SimpleUkVatProcessor()); 

            _refreshProcessor = refreshProcessor;

            CompositeOrderProcessor closeProcessor = new CompositeOrderProcessor();
            closeProcessor.Add(GetProcessor("order.confirmation"));
            _closeProcessor = closeProcessor;
        }
示例#9
0
 public CartController(IProductsRepository ropo, IOrderProcessor pcor)
 {
     repository     = ropo;
     orderProcessor = pcor;
 }
示例#10
0
 public AppView(ILoginUnitOfWork loginUnitOfWork, IProductUnitOfWork productUnitOfWork, IOrderUnitOfWork orderUnitOfWork, IOrderProcessor processor)
 {
     InitializeComponent();
     DataContext = ViewManager.GetInstance(loginUnitOfWork, productUnitOfWork, orderUnitOfWork, processor);
 }
示例#11
0
 /// <summary>
 /// Sets the <see cref="IOrderProvider"/> used for fetching orders for the algorithm
 /// </summary>
 /// <param name="orderProvider">The <see cref="IOrderProvider"/> to be used to manage fetching orders</param>
 public void SetOrderProcessor(IOrderProcessor orderProvider)
 {
     _orderProcessor = orderProvider;
 }
示例#12
0
 public CartApplicationService(IOrderProcessor processor)
 {
     orderRepository = processor;
 }
示例#13
0
 public void ConfigureProcessor(IOrderProcessor processor)
 {
     _orderProcessor = processor;
 }
示例#14
0
 public BasketController(ICakeRepository repo, IOrderProcessor processor)
 {
     repository     = repo;
     orderProcessor = processor;
 }
示例#15
0
 public ReaderController(IBooksReopository BookRepository, IOrderProcessor OrderProcessor, MailProcessor MailProcessor)
 {
     this.Bookrepository = BookRepository;
     this.OrderProcessor = OrderProcessor;
     this.MailProcessor  = MailProcessor;
 }
 public OrderController(IOrderRepository repository, IOrderProcessor processor,ISaveOrderProcessor saveProcessor)
 {
     orderRepository = repository;
     orderProcessor = processor;
     saveOrderProcessor = saveProcessor;
 }
示例#17
0
 public CartController(IProductRepository repository, IOrderProcessor proc)
 {
     this.repository     = repository;
     this.orderProcessor = proc;
 }
示例#18
0
 public OrderPlacedCommand(IOrderProcessor orderProcessor, IEvents events)
 {
     this.orderProcessor = orderProcessor;
     this.events = events;
 }
示例#19
0
 public CartController(IGameRepository repository, IOrderProcessor orderProcessor)
 {
     _repository = repository;
     _orderProcessor = orderProcessor;
 }
		public void Remove(IOrderProcessor processor) {
			_processList.Remove(processor);
		}
		public void Add(IOrderProcessor processor) {
			_processList.Add(processor);
		}
示例#22
0
 public ServerReportController(IOrderProcessor orderProcessor)
 {
     _orderProcessor = orderProcessor;
 }
示例#23
0
 public OrderProcessorDecorator(IOrderProcessor orderprocessor)
 {
     OrderProcessor = orderprocessor;
 }
示例#24
0
 public CartController(IBookRepository repo, IOrderProcessor pro)
 {
     repository     = repo;
     orderProcesser = pro;
 }
示例#25
0
 public CartController(IGameRepository repo, IOrderProcessor processor)
 {
     repository     = repo;
     orderProcessor = processor;
 }
示例#26
0
 public CartController(IUnitOfWork repo, IOrderProcessor proc)
 {
     repository     = repo;
     orderProcessor = proc;
 }
示例#27
0
 /// <summary>
 /// Constructor for <c>AdminController</c>.
 /// </summary>
 /// <param name="productRepository">Products Repository for managing Products.</param>
 /// <param name="orderProcessor">Orders Repository for managing Orders.</param>
 public AdminController(IProductRepository productRepository, IOrderProcessor orderProcessor)
 {
     _productRepository = productRepository;
     _orderProcessor    = orderProcessor;
 }
示例#28
0
 public CartController(IGameRepository repo, IOrderProcessor processor, ICartProvider cartProvider)
 {
     _repository     = repo;
     _orderProcessor = processor;
     _cartProvider   = cartProvider;
 }
示例#29
0
 public CartController(IProductsRepository repo,IOrderProcessor order)
 {
     repository = repo;
     orderprocessor = order;
 }
示例#30
0
 public ServerReportController(IOrderProcessor orderProcessor)
 {
     _orderProcessor = orderProcessor;
 }
示例#31
0
 public CartController(IProductRepository repo, IOrderProcessor orderProcessorParam)
 {
     repository = repo;
     orderProcessor = orderProcessorParam;
 }
示例#32
0
 public CartController(IProductRepository repo, IOrderProcessor order)
 {
     repository     = repo;
     orderProcessor = order;
 }
示例#33
0
 public CartController(IStoreRepository repo, IOrderProcessor orderProcessor_)
 {
     repository = repo;
     orderProcessor = orderProcessor_;
 }
示例#34
0
 public CartController(ICakesRepository cakesRepository, IOrderProcessor orderProcessor)
 {
     this.cakesRepository = cakesRepository;
     this.orderProcessor = orderProcessor;
 }
 public CheckoutTest()
 {
     _processor = Substitute.For <IOrderProcessor>();
 }
 public PrepareOrderRequestedActivity(ConsumeContext context, IGrpcClient <IOrderProcessor> grpcClient, ILogger <PrepareOrderRequestedActivity> logger)
 {
     _context = context;
     _logger  = logger;
     _client  = grpcClient.Client;
 }
示例#37
0
 public CartController(IProductRepository repoParam, IOrderProcessor procParam)
 {
     this.repository     = repoParam;
     this.orderProcessor = procParam;
 }
 public CancelOrderConsumer(IGrpcClient <IOrderProcessor> grpcClient, ILogger <CancelOrderConsumer> logger)
 {
     _logger = logger;
     _client = grpcClient.Client;
 }
 public CheckoutController(IAddressRepository addressRepository, IPaymentTypesRepository paymentTypesRepository,
                           IMapper mapper, ApplicationUserManager applicationUserManager, IProductRepository productRepository, IOrderProcessor orderProcessor)
     : base(applicationUserManager)
 {
     this.addressRepository      = addressRepository;
     this.paymentTypesRepository = paymentTypesRepository;
     this.mapper            = mapper;
     this.orderProcessor    = orderProcessor;
     this.productRepository = productRepository;
 }
示例#40
0
 public CartController(IProductRepository repository, IOrderProcessor processor)
 {
     _repository     = repository;
     _orderProcessor = processor;
 }
示例#41
0
 public CartController(IGameRepository repository, IOrderProcessor processor)
 {
     this.repository = repository;
     orderProcessor  = processor;
 }
示例#42
0
 public OrderController(IPokemonRepository repo, IOrderProcessor proc)
 {
     repository     = repo;
     orderProcessor = proc;
 }
示例#43
0
 public CartController(IProductsRepository repo, IOrderProcessor orderProcessor)
 {
     this.repository     = repo;
     this.orderProcessor = orderProcessor;
 }
示例#44
0
 public CartController(IProductRepository repository,IOrderProcessor opderProc)
 {
     this.repository = repository;
     this.opderProc = opderProc;
 }
示例#45
0
 public CartController(IRepository repo, IOrderProcessor processor)
 {
     repository = repo;
     orderProcessor = processor;
 }
 public CartController(IProductRepository repo, IOrderProcessor processor)
 {
     _repository = repo;
     _orderProcessor = processor;
 }
示例#47
0
 public CartController(IProductRepository repo, IOrderProcessor proc)
 {
     repository     = repo;
     orderProcessor = proc;
 }
 public PaymentProcessorController(IOrderProcessor proc)
 {
     orderProcessor = proc;
 }
示例#49
0
        private JobBuilder GetDeliveryJobBuilder(UserModel userModel, UserModel adminUserModel, DeliveryOrder deliveryOrderModel, Vendor vendor)
        {
            JobBuilder builder;
            orderProcessor = new DeliveryOrderProcessor(
                      orderCalculationService,
                      serviceChargeCalculationService);
            var paymentMethod = paymentService.GetPaymentMethodByKey(deliveryOrderModel.PaymentMethod);
            orderProcessor.ProcessOrder(deliveryOrderModel);

            // Resolve appropriate profit sharing strategy here

            builder = adminUserModel == null ?
                new DeliveryJobBuilder(deliveryOrderModel, userModel, hridService, paymentMethod, vendor)
                : new DeliveryJobBuilder(deliveryOrderModel, userModel, adminUserModel, hridService, paymentMethod, vendor);
            return builder;
        }
示例#50
0
 public CartController(IOrderProcessor orderProcessor)
 {
     _orderProcessor = orderProcessor;
 }
示例#51
0
 public CartController(IProductRepository rep, IOrderProcessor proc)
 {
     this.repository = rep;
     this.orderProcessor = proc;
 }
 public OrderCancelRequestActivity(ConsumeContext context, IGrpcClient <IOrderProcessor> grpcClient, ILogger <OrderCancelRequestActivity> logger)
 {
     _context = context;
     _logger  = logger;
     _client  = grpcClient.Client;
 }
示例#53
0
 public CartController(IProductRepository repository, IOrderProcessor orderProcessor, IUsersRepository usersRespository)
 {
     this.repository       = repository;
     this.orderProcessor   = orderProcessor;
     this.usersRespository = usersRespository;
 }
示例#54
0
 public CartController(IProductRepository repo, IOrderProcessor proc)
 {
     _repo = repo;
     _proc = proc;
 }
示例#55
0
 public CartController(IProductRepository repository, IOrderProcessor orderProcessor)
 {
     this.repository = repository;
     this.orderProcessor = orderProcessor;
 }
示例#56
0
 public CartController(IProductRepository productRepository, IOrderProcessor orderProc)
 {
     repository     = productRepository;
     orderProcessor = orderProc;
 }
示例#57
0
 /// <summary>
 /// Sets the <see cref="IOrderProvider"/> used for fetching orders for the algorithm
 /// </summary>
 /// <param name="orderProvider">The <see cref="IOrderProvider"/> to be used to manage fetching orders</param>
 public void SetOrderProcessor(IOrderProcessor orderProvider)
 {
     _orderProcessor = orderProvider;
 }
示例#58
0
 public VoidOrderItemConsumer(IGrpcClient <IOrderProcessor> grpcClient, ILogger <VoidOrderItemConsumer> logger)
 {
     _logger = logger;
     _client = grpcClient.Client;
 }
示例#59
0
 public CartController(IProductRepository repo, IOrderProcessor proc)
 {
     repository = repo;
     orderProcessor = proc;
 }
 public CartController(IProductRepository repository, Cart cart, IOrderProcessor orderProcessor)
 {
     _repository     = repository;
     _cart           = cart;
     _orderProcessor = orderProcessor;
 }