Пример #1
0
        protected override Pizza CreatePizza(string type)
        {
            Pizza pizza = null;

            if (type.Equals("cheese"))
            {
                pizza = new ChigadoPizzaCheese();
            }

            return(pizza);
        }
Пример #2
0
        protected override Pizza CreatePizza(string type)
        {
            Pizza pizza = null;
            IPizzaIngredientsFactory pizzaIngredientsFactory = new ChicagoPizzaIngredientsFactory();

            if (type.Equals("cheese"))
            {
                pizza = new ChigadoPizzaCheese(pizzaIngredientsFactory);
            }

            return(pizza);
        }