public Commerce6(IBillingProcessSuffixID billingProcessor, ICustomerSuffixID customer, INotifierSuffixID notifier, ILoggerSuffixID logger) { _BillingProcessor = billingProcessor; _Customer = customer; _Notifier = notifier; _Logger = logger; }
public void ProcessOrder(OrderInfo orderInfo) { IBillingProcessSuffixID 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"); }
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"); }