Esempio n. 1
0
 public void ProcessOrder(OrderInfo orderInfo)
 {
     _BillingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
     _CustomerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
     _Notifier.SendReceipt(orderInfo);
     _Logger.Log("Finished processing the order.");
 }
Esempio n. 2
0
        public void ProcessOrder(OrderInfo order)
        {
            _billingProcessor.ProcessPayment(order.CustomerName, order.CreditCardNumber, order.Amount);
            _customerProcessor.UpdateCustomerOrder(order.CustomerName, order.Product);
            _notifier.SendReceipt(order);

            Console.WriteLine("Processing done!");
        }
        public void ProcessOrder(OrderInfo orderInfo)
        {
            _billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
            _customerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
            _notifier.SendReceipt(orderInfo);

            _logger.LogInformation($"End of processsing order with Id: {orderInfo.Id}");
        }
Esempio n. 4
0
 public void ProcessOrder(OrderInfo orderInfo)
 {
     _billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
     _logger.Log("Billing processed");
     _customerProcessor.UpdateCustomer(orderInfo.CustomerName);
     _logger.Log("Updated to customer");
     _notifier.SendReceipt(orderInfo);
     _logger.Log("Receipt sent");
 }
Esempio n. 5
0
 public void ProcessOrder(OrderInfo orderInfo)
 {
     _BillingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
     _Logger.Log("Billing processed");
     _Customer.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
     _Logger.Log("Customer updated");
     _Notifier.SendReceipt(orderInfo);
     _Logger.Log("Receipt sent");
 }
Esempio n. 6
0
 public void ProcessOrder(OrderInfo orderInfo)
 {
     _billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
     _logger.Log("Setter Injection: Billing processed");
     _customer.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
     _logger.Log("Setter Injection: Customer updated");
     _notifier.SendReceipt(orderInfo);
     _logger.Log("Setter Injection: Receipt sent");
 }
Esempio n. 7
0
        public void ProcessOrder(OrderInfo orderInfo)
        {
            IBillingProcessor billingProcessor = _billingProcessorLocator.GetBillingProcessor();

            billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
            _logger.Log("Billing processed");
            _customer.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
            _logger.Log("Customer updated");
            _notifier.SendReceipt(orderInfo);
            _logger.Log("Receipt sent");
        }
Esempio n. 8
0
        public void ProcessOrder(OrderInfo orderInfo)
        {
            IBillingProcessor      billingProcessor      = _ProcessorLocator.GetProcessor <IBillingProcessor>();
            ICustomerProcessor     customerProcessor     = _ProcessorLocator.GetProcessor <ICustomerProcessor>();
            INotificationProcessor notificationProcessor = _ProcessorLocator.GetProcessor <INotificationProcessor>();
            ILoggingProcessor      loggingProcessor      = _ProcessorLocator.GetProcessor <ILoggingProcessor>();

            billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
            loggingProcessor.Log("Billing processed");
            customerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
            loggingProcessor.Log("Customer updated");
            notificationProcessor.SendReceipt(orderInfo);
            loggingProcessor.Log("Receipt sent");
        }
Esempio n. 9
0
        public void ProcessOrder(OrderInfo orderInfo)
        {
            IBillingProcessor      billingProcessor      = _processorLocator.GetProcessor <IBillingProcessor>();
            ICustomerProcessor     customerProcessor     = _processorLocator.GetProcessor <ICustomerProcessor>();
            INotificationProcessor notificationProcessor = _processorLocator.GetProcessor <INotificationProcessor>();
            ILoggingProcessor      loggingProcessor      = _processorLocator.GetProcessor <ILoggingProcessor>();

            billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
            loggingProcessor.Log("Billing processed");
            customerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
            loggingProcessor.Log("Customer updated");
            notificationProcessor.SendReceipt(orderInfo);
            loggingProcessor.Log("Receipt sent");


            // Named Instance
            _plugin.DoSomething();

            // Regular Usage
            //foreach (IPostOrderPlugin plugin in _Plugins)
            //{
            //    plugin.DoSomething();
            //}
        }
Esempio n. 10
0
 public void ProcessOrder(OrderInfo orderInfo)
 {
     _BillingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.CustomerEmail);
     _CustomerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
     _Notifier.SendReceipt(orderInfo);
 }
Esempio n. 11
0
 public void ProcessOrder(Order order)
 {
     billingProcessor.ProcessPayment(order.CreditCard, order.CustomerName);
     customerProcessor.UpdateCustomerOrder(order.CustomerName, order.Product);
     notifier.SendReceipt(order.Product);
 }
 internal void ProcessOrder(OrderInfo orderInfo)
 {
     _billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
     _customerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
     _notifier.SendReceipt(orderInfo);
 }