Ejemplo n.º 1
0
        //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);
        }
Ejemplo n.º 2
0
        //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);

        }