Exemple #1
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");
 }
Exemple #2
0
        public void ProcessOrder(OrderInfo orderInfo)
        {
            IBillingProcessSuffixID billingProcessor  = _processorLocatorGeneric.GetProcessor <IBillingProcessSuffixID>();
            ICustomerSuffixID       customerProcessor = _processorLocatorGeneric.GetProcessor <ICustomerSuffixID>();
            INotifierSuffixID       notifierProcessor = _processorLocatorGeneric.GetProcessor <INotifierSuffixID>();
            ILoggerSuffixID         loggerProcessor   = _processorLocatorGeneric.GetProcessor <ILoggerSuffixID>();

            billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
            loggerProcessor.Log("Billing Processed");
            customerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
            loggerProcessor.Log("Customer Updated");
            notifierProcessor.SendReceipt(orderInfo);
            loggerProcessor.Log("Receipt Sent");
        }