Beispiel #1
0
        static void Main(string[] args)
        {
            SendOrder _sendOrder = new SendDairyFreeOrder();

            _sendOrder._restaurant = new DinerOrders();
            _sendOrder.Send();

            _sendOrder._restaurant = new FancyRestaurantOrders();
            _sendOrder.Send();

            _sendOrder             = new SendGlutenFreeOrder();
            _sendOrder._restaurant = new DinerOrders();
            _sendOrder.Send();

            _sendOrder._restaurant = new FancyRestaurantOrders();
            _sendOrder.Send();

            Console.ReadKey();
        }
Beispiel #2
0
        static void Food()
        {
            SendOrder order = new SendDairyFreeOrder()
            {
                Restaurant = new DinerOrders()
            };

            order.Send();

            order.Restaurant = new FancyRestaurantOrders();
            order.Send();

            order = new SendGlutenFreeOrder()
            {
                Restaurant = new DinerOrders()
            };
            order.Send();

            order.Restaurant = new FancyRestaurantOrders();
            order.Send();

            Console.ReadKey();
        }