public void PrepararPizzaSemBorda(IPizzaBuilder pizzaBuilder, PizzaSize pizzaSize)
 {
     pizzaBuilder.PreparaMassa(pizzaSize);
     pizzaBuilder.InsereIngradientes();
     pizzaBuilder.TempoForno();
     pizzaBuilder.DefineValor();
 }
Esempio n. 2
0
 public Pizza Build(IPizzaBuilder builder)
 {
     builder.SetName()
     .SetDescription()
     .SetPrice()
     .SetToppings();
     return(builder.GetPizza());
 }
Esempio n. 3
0
        public static void MakeSomePizza(IPizzaBuilder builder)
        {
            bool   loopBreak = true;
            string str       = null;

            while (str != "0")
            {
                Console.WriteLine("\nChoose your option:\n");
                Console.WriteLine("" +
                                  "1 - Add Cheese\n" +
                                  "2 - Add Tomatoes\n" +
                                  "3 - Add Olives\n" +
                                  "4 - Add Meat\n" +
                                  "5 - Make Pizza\n" +
                                  "\n0 - exit\n");
                str = Console.ReadLine();
                switch (str)
                {
                case "1": builder.AddCheese(); loopBreak = false; break;

                case "2": builder.AddTomatoes(); loopBreak = false; break;

                case "3": builder.AddOlives(); loopBreak = false; break;

                case "4": builder.AddMeat(); loopBreak = false; break;

                case "5": Console.Write(builder.GetPizza()
                                        .ListIngredients()); loopBreak = true; break;

                case "0": loopBreak = true; break;

                default: Console.WriteLine("Enter the required number\n"); break;
                }
                if (loopBreak != false)
                {
                    builder.Reset();
                    break;
                }
            }
        }
Esempio n. 4
0
 public DirectorPizaa(IPizzaBuilder PizzaParaCrear)
 {
     _builder = PizzaParaCrear;
 }
Esempio n. 5
0
 public PizzaDirector(IPizzaBuilder pizzaBuilder)
 {
     _pizzaBuilder = pizzaBuilder;
 }
Esempio n. 6
0
 public void SetPizzaBuilder(IPizzaBuilder builder)
 {
     _pizzaBuilder = builder;
 }
Esempio n. 7
0
 public Waiter(IPizzaBuilder pb)
 {
     pizzaBuilder = pb;
 }
Esempio n. 8
0
 public void SetPizzaBuilder(IPizzaBuilder pb)
 {
     pizzaBuilder = pb;
 }
Esempio n. 9
0
 public Pizzeria()
 {
     _firstBuilder  = new PaperoniBuilder();
     _secondBuilder = new DominosBuilder();
     _thirdBuilder  = new MargaritaBuilder();
 }
Esempio n. 10
0
 public void MakePizza(IPizzaBuilder pizzaBuilder)
 {
     pizzaBuilder.MakePizzaDough();
     pizzaBuilder.AddIngredients();
     pizzaBuilder.PutInTheOven();
 }
 public CookDirector(IPizzaBuilder pizzaBuilder)
 {
     this.pizzaBuilder = pizzaBuilder;
 }
Esempio n. 12
0
 public PizzaDirector(IPizzaBuilder pizzaBuilder)
 {
     PizzaBuilder = pizzaBuilder;
     OnBaked      = BakedPizzaHandler.EatPizza;
 }
Esempio n. 13
0
 public void ChangeBuilder(IPizzaBuilder builder)
 {
     this._builder = builder;
 }