public override void ApplyToppings() { ToppingMaker toppingMaker = new ToppingMaker(new TomatoSauceTopping()); toppingMaker.BuildTopping(); var tomatoSauce = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new CheeseTopping()); toppingMaker.BuildTopping(); var cheese = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new HamTopping()); toppingMaker.BuildTopping(); var ham = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new PineappleTopping()); toppingMaker.BuildTopping(); var pineapple = toppingMaker.GetTopping(); List <Topping> toppings = new List <Topping>() { tomatoSauce, cheese, ham, pineapple }; pizza.Toppings = toppings; }
public List <IOrdable> GetStandardMenu() { List <IOrdable> standardMenu = new List <IOrdable>(); List <PizzaBuilder> pizzaBuilders = new List <PizzaBuilder>() { new HawaiiBuilder(), new KebabPizzaBuilder(), new MargheritaBuilder(), new QuatroStagioniBuilder() }; foreach (PizzaBuilder pizzaBuilder in pizzaBuilders) { PizzaMaker pizzaMaker = new PizzaMaker(pizzaBuilder); pizzaMaker.BuildPizza(); standardMenu.Add(pizzaMaker.GetPizza()); } List <DrinkBuilder> drinkBuilders = new List <DrinkBuilder>() { new CocaCola(), new Fanta(), new Sprite() }; foreach (DrinkBuilder drinkBuilder in drinkBuilders) { DrinkMaker drinkMaker = new DrinkMaker(drinkBuilder); drinkMaker.BuildDrink(); standardMenu.Add(drinkMaker.GetDrink()); } List <ToppingBuilder> toppingBuilders = new List <ToppingBuilder>() { new ArtichokeTopping(), new ClamTopping(), new CorianderTopping(), new HamTopping(), new KebabSauceTopping(), new MushroomTopping(), new OnionTopping(), new PineappleTopping(), new ShrimpTopping(), }; foreach (ToppingBuilder toppingBuilder in toppingBuilders) { ToppingMaker toppingMaker = new ToppingMaker(toppingBuilder); toppingMaker.BuildTopping(); standardMenu.Add(toppingMaker.GetTopping()); } return(standardMenu); }
public override void ApplyToppings() { ToppingMaker toppingMaker = new ToppingMaker(new TomatoSauceTopping()); toppingMaker.BuildTopping(); var tomatoSauce = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new CheeseTopping()); toppingMaker.BuildTopping(); var cheese = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new KebabTopping()); toppingMaker.BuildTopping(); var kebab = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new MushroomTopping()); toppingMaker.BuildTopping(); var mushrooms = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new OnionTopping()); toppingMaker.BuildTopping(); var onions = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new KebabSauceTopping()); toppingMaker.BuildTopping(); var kebabSauce = toppingMaker.GetTopping(); Topping feferoni = new Topping(); feferoni.Name = "Feferoni"; Topping icebergLettuce = new Topping(); icebergLettuce.Name = "Iceberg Lettuce"; List <Topping> toppings = new List <Topping>() { tomatoSauce, cheese, kebab, mushrooms, onions, feferoni, icebergLettuce, kebabSauce }; pizza.Toppings = toppings; }
public override void ApplyToppings() { ToppingMaker toppingMaker = new ToppingMaker(new TomatoSauceTopping()); toppingMaker.BuildTopping(); var tomatoSauce = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new CheeseTopping()); toppingMaker.BuildTopping(); var cheese = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new HamTopping()); toppingMaker.BuildTopping(); var ham = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new ShrimpTopping()); toppingMaker.BuildTopping(); var shrimp = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new ClamTopping()); toppingMaker.BuildTopping(); var clams = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new MushroomTopping()); toppingMaker.BuildTopping(); var mushrooms = toppingMaker.GetTopping(); toppingMaker = new ToppingMaker(new ArtichokeTopping()); toppingMaker.BuildTopping(); var artichoke = toppingMaker.GetTopping(); List <Topping> toppings = new List <Topping>() { cheese, tomatoSauce, ham, shrimp, clams, mushrooms, artichoke }; pizza.Toppings = toppings; }