예제 #1
0
        private static void Main(string[] args)
        {
            var shipper    = new ItemShipper();
            var controller = new ItemController("Default ", shipper, ShippingCallback);

            controller.PerformShippment();
        }
예제 #2
0
 public ItemController(string startingMessage, ItemShipper shipper,
                       ItemShipper.ShippingNotificationDelegate notificationCallback)
 {
     Message                       = startingMessage;
     ShippingProvider              = shipper;
     shipper.NotificationCallback += notificationCallback;
     shipper.NotificationCallback += NotifyShippingCallback;
 }