public Pizza CreatePizza(string type) { Pizza pizza = null; if (type == "Cheese") pizza = new CheesePizza(); else if (type == "Clam") pizza = new ClamPizza(); else if (type == "Suede") pizza = new ShoePizza(); return pizza; }
// portland-style preparation for all pizzas protected override Pizza CreatePizza(string type) { Pizza pizza = null; IIngredientFactory ingredientFactory = new PortlandIngredientFactory(); if (type == "Cheese") pizza = new CheesePizza(ingredientFactory); else if (type == "Clam") pizza = new ClamPizza(ingredientFactory); else if (type == "Suede") pizza = new ShoePizza(ingredientFactory); return pizza; }
public Pizza CreatePizza(string type) { Pizza pizza = null; if (type == "Cheese") { pizza = new CheesePizza(); } else if (type == "Clam") { pizza = new ClamPizza(); } else if (type == "Suede") { pizza = new ShoePizza(); } return(pizza); }
// hillsboro-style preparation for all pizzas protected override Pizza CreatePizza(string type) { Pizza pizza = null; IIngredientFactory ingredientFactory = new HillsboroIngredientFactory(); if (type == "Cheese") { pizza = new CheesePizza(ingredientFactory); } else if (type == "Clam") { pizza = new ClamPizza(ingredientFactory); } else if (type == "Suede") { pizza = new ShoePizza(ingredientFactory); } return(pizza); }