protected PizzaIngredientFactory(IDough dough, ISauce sauce, IClams clams, ICheese cheese)
 {
     Dough  = dough;
     Sauce  = sauce;
     Clams  = clams;
     Cheese = cheese;
 }
Exemple #2
0
 public virtual void Prepare()
 {
     Console.WriteLine("Preparing: " + _name);
     _dough     = _ingredientFactory.CreateDough();
     _sauce     = _ingredientFactory.CreateSauce();
     _cheese    = _ingredientFactory.CreateCheese();
     _clams     = _ingredientFactory.CreateClam();
     _pepperoni = _ingredientFactory.CreatePepperoni();
     _veggies   = _ingredientFactory.CreateVeggies();
 }
Exemple #3
0
 public void Prepare()
 {
     Console.WriteLine($"Preparing: {Name}");
     Dough  = _pizzaIngredientFactory.CreateDough();
     Sauce  = _pizzaIngredientFactory.CreateSauce();
     Clams  = _pizzaIngredientFactory.CreateClams();
     Cheese = _pizzaIngredientFactory.CreateCheese();
     Console.WriteLine($"    {Dough?.Name}");
     Console.WriteLine($"    {Sauce?.Name}");
     Console.WriteLine($"    {Clams?.Name}");
     Console.WriteLine($"    {Cheese?.Name}");
 }