public override CheesePizza MakeCheesePizza()
 {
     var ingredients = new List<string>
                           {
                               "tomatoes",
                               "white cheese",
                               "yellow cheese",
                               "blue cheese",
                               "extra smelly cheese"
                           };
     var pizza = new CheesePizza(ingredients, Name);
     return pizza;
 }
Esempio n. 2
0
 protected override Pizza Create(string type)
 {
     Pizza pizza = null;
     PizzaIngredientFactory ingredientFactory = new NyPizzaIngredientFactory();
     switch (type)
     {
         case "cheese":
             pizza = new CheesePizza(ingredientFactory);
             pizza.SetName("New York Style Cheese Pizza");
             break;
         case "clams":
             pizza = new ClamPizza(ingredientFactory);
             pizza.SetName("New York Style Clam Pizza");
             break;
         default:
             pizza = null;
             break;
     }
     return pizza;
 }
 public override CheesePizza MakeCheesePizza()
 {
     var ingredients = new List<string> { "rotten tomatoes", "grey cheese", "green cheese" };
     var pizza = new CheesePizza(ingredients, Name);
     return pizza;
 }