//This method allows other objects to subscribe to the ProcessedOrderAddedEvent. //The ProcessedOrderAddedEvent is designed to notify travel agencies that an order has //been reviewed by a hotel supplier public static void callMethodWhenAnOrderIsProcessed(Action <int> subscriberMethodForTravelAgency) { //The method that will get called in the travel agency object takes a single integer, which is //the id of the travel agency for which the new order that was added is destined. //subscribe the method from the travel agency to the event that will be triggered when a new //method is processed from the hotel supplier. signalThatAnOrderHasBeenProcessed += new ProcessedOrderAddedEvent(subscriberMethodForTravelAgency); }
//This method allows other objects to subscribe to the ProcessedOrderAddedEvent. //The ProcessedOrderAddedEvent is designed to notify travel agencies that an order has //been reviewed by a hotel supplier public static void callMethodWhenAnOrderIsProcessed(Action<int> subscriberMethodForTravelAgency) { //The method that will get called in the travel agency object takes a single integer, which is //the id of the travel agency for which the new order that was added is destined. //subscribe the method from the travel agency to the event that will be triggered when a new //method is processed from the hotel supplier. signalThatAnOrderHasBeenProcessed += new ProcessedOrderAddedEvent(subscriberMethodForTravelAgency); }