Ejemplo n.º 1
0
 //List<IEnumerable> Menus;
 public Waitress(PancakeHouseMenu pancakeHouseMenu, DinerMenu dinerMenu, CafeMenu cafeMenu)
 {
     PancakeHouseMenu = pancakeHouseMenu;
     DinerMenu        = dinerMenu;
     CafeMenu         = cafeMenu;
     //Menus = menus;
 }
        public static void Test1()
        {
            var pancakeHouseMenu = new PancakeHouseMenu();
            var dinerMenu        = new DinerMenu();
            var cafeMenu         = new CafeMenu();
            var waitress         = new Waitress(pancakeHouseMenu, dinerMenu, cafeMenu);

            waitress.PrintMenu();
        }
        public static void Test2()
        {
            var pancakeHouseMenu = new PancakeHouseMenu();
            var dinerMenu        = new DinerMenu();
            var cafeMenu         = new CafeMenu();
            var waitress         = new Waitress2(new List <IMenu> {
                pancakeHouseMenu, dinerMenu, cafeMenu
            });

            waitress.PrintMenu();
        }