Exemple #1
0
 public Commerce5(IBillingProcessor billingProcessor, ICustomerProcessor customer, INotificationProcessor notifier, ILoggingProcessor logger)
 {
     _billingProcessor = billingProcessor;
     _customer         = customer;
     _notifier         = notifier;
     _logger           = logger;
 }
 public Commerce5(IBillingProcessor billingProcessor, ICustomerProcessor customer, INotificationProcessor notifier, ILoggingProcessor logger)
 {
     _BillingProcessor = billingProcessor;
     _Customer = customer;
     _Notifier = notifier;
     _Logger = logger;
 }
 public Commerce2(IBillingProcessorLocator billingProcessorLocator, ICustomerProcessor customer, INotificationProcessor notifier, ILoggingProcessor logger)
 {
     _BillingProcessorLocator = billingProcessorLocator;
     _Customer = customer;
     _Notifier = notifier;
     _Logger   = logger;
 }
Exemple #4
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");
        }
Exemple #5
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();
            //}
        }
Exemple #6
0
 public void Processors(ILeaveCalendarDataProcessor lcDataProcessor, ILoggingProcessor loggingProcessor, INotificationProcessor notificationProcessor)
 {
     _LeaveCalendarDataProcessor = lcDataProcessor;
     _LoggingProcessor = loggingProcessor;
     _NotificationProcessor = notificationProcessor;
 }
Exemple #7
0
        public OpenViewModel(ILoggingProcessor processor)
        {
            processor.AddLogger(this);

            _routeLog = new List<IRoute>();
        }
 public HomeController(ILeaveCalendarDataProcessor lcDataProcessor, ILoggingProcessor loggingProcessor, INotificationProcessor notificationProcessor)
 {
     _LeaveCalendarDataProcessor = lcDataProcessor;
     _LoggingProcessor = loggingProcessor;
     _NotificationProcessor = notificationProcessor;
 }