//Similar to the callMethodWhenAnOrderIsProcessed method above, this method takes as a parameter a method //from the HotelSuppliers that should be caled if a new order is submitted to the order processor. public static void callMethodWhenAnNewOrderIsSubmitted(Action <int> subscriberMethodForHotelSupplier) { //The subscriber method has a single parameter which is designed to be the destination id for //the hotel supplier for which the order is destined. //subscribe the hotelsupplier method to the event so that it is notified when a new order is submitted signalThatANewOrderHasBeenSubmitted += new UnProcessedOrderAdded(subscriberMethodForHotelSupplier); }
//Similar to the callMethodWhenAnOrderIsProcessed method above, this method takes as a parameter a method //from the HotelSuppliers that should be caled if a new order is submitted to the order processor. public static void callMethodWhenAnNewOrderIsSubmitted(Action<int> subscriberMethodForHotelSupplier) { //The subscriber method has a single parameter which is designed to be the destination id for //the hotel supplier for which the order is destined. //subscribe the hotelsupplier method to the event so that it is notified when a new order is submitted signalThatANewOrderHasBeenSubmitted += new UnProcessedOrderAdded(subscriberMethodForHotelSupplier); }