Beispiel #1
0
        public Burger Create(IIngredientFactory IngredientFactory)
        {
            var burger = new FishBurger();

            //// 備料

            burger.Bread = IngredientFactory.GetBread();

            burger.Veggie = IngredientFactory.GetVeggie();

            //// 準備魚肉
            burger.Meat = IngredientFactory.GetFish();

            return(burger);
        }
        public Burger Create(IIngredientFactory IngredientFactory)
        {
            var burger = new ChickenBurger();

            //// 備料

            burger.Bread = IngredientFactory.GetBread();

            burger.Veggie = IngredientFactory.GetVeggie();

            //// 準備雞肉
            burger.Meat = IngredientFactory.GetChicken();

            return(burger);
        }