public void OrderPizza(PizzaType type) { Pizza pizza = pizzaFactory.CreatePizza(type); pizza.Prepare(); pizza.Bake(); pizza.Cut(); pizza.Box(); }
public IPizza OrderPizza(IList <string> ingredients) { IPizza pizza = _factory.CreatePizza(ingredients); pizza.Bake(); pizza.Cut(); pizza.Box(); return(pizza); }
public string GetDetailsHtml(PizzaState wizardState) { var pizza = pizzaFactory.CreatePizza(wizardState); return (string.Format( "<div>Selected pizza: {0}</div><div>Price: <span style=\"font-weight: bold; font-size: larger;\">{1}</span></div>", pizza.PizzaDescription, priceCalculator.CalculatePrice(pizza).ToString("c"))); }
public IPizza OrderPizza(PizzaType pizzaType) { IPizza pizza = _pizzaFactory.CreatePizza(pizzaType); pizza.Prepare(); pizza.Bake(); pizza.Cut(); pizza.Box(); return(pizza); }
public static void MakePizza(IPizzaFactory pizzaFactory, bool stuffedCrust) { var pizza = pizzaFactory.CreatePizza(); pizza.MakePizza(stuffedCrust); Console.WriteLine($"{pizza.PizzaName} : £{pizza.Price} {(pizza.StuffedCrust ? "with stuffed crust" : "with regular crust")}"); Console.WriteLine($"with {pizza.Sauce} sauce"); Console.WriteLine("Toppings"); foreach (var topping in pizza.Toppings) { Console.WriteLine(topping); } Console.WriteLine($"Ready in {pizza.TimeToPrepare.TotalMinutes} minutes."); Console.WriteLine(); }
protected Pizza CreatePizza(PizzaStyle pizzaStyle) { return(_pizzaFactory.CreatePizza(pizzaStyle)); }
public Pizza CreatePizza() => _pizzaFactory.CreatePizza();
public Pizza OrderPizza(string pizzaType) { return(pizzaFactory.CreatePizza(pizzaType)); }