public void PrepararPizzaSemBorda(IPizzaBuilder pizzaBuilder, PizzaSize pizzaSize)
 {
     pizzaBuilder.PreparaMassa(pizzaSize);
     pizzaBuilder.InsereIngradientes();
     pizzaBuilder.TempoForno();
     pizzaBuilder.DefineValor();
 }
Пример #2
0
 public Pizza Build(IPizzaBuilder builder)
 {
     builder.SetName()
     .SetDescription()
     .SetPrice()
     .SetToppings();
     return(builder.GetPizza());
 }
Пример #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;
                }
            }
        }
Пример #4
0
 public DirectorPizaa(IPizzaBuilder PizzaParaCrear)
 {
     _builder = PizzaParaCrear;
 }
Пример #5
0
 public PizzaDirector(IPizzaBuilder pizzaBuilder)
 {
     _pizzaBuilder = pizzaBuilder;
 }
Пример #6
0
 public void SetPizzaBuilder(IPizzaBuilder builder)
 {
     _pizzaBuilder = builder;
 }
Пример #7
0
 public Waiter(IPizzaBuilder pb)
 {
     pizzaBuilder = pb;
 }
Пример #8
0
 public void SetPizzaBuilder(IPizzaBuilder pb)
 {
     pizzaBuilder = pb;
 }
Пример #9
0
 public Pizzeria()
 {
     _firstBuilder  = new PaperoniBuilder();
     _secondBuilder = new DominosBuilder();
     _thirdBuilder  = new MargaritaBuilder();
 }
Пример #10
0
 public void MakePizza(IPizzaBuilder pizzaBuilder)
 {
     pizzaBuilder.MakePizzaDough();
     pizzaBuilder.AddIngredients();
     pizzaBuilder.PutInTheOven();
 }
Пример #11
0
 public CookDirector(IPizzaBuilder pizzaBuilder)
 {
     this.pizzaBuilder = pizzaBuilder;
 }
Пример #12
0
 public PizzaDirector(IPizzaBuilder pizzaBuilder)
 {
     PizzaBuilder = pizzaBuilder;
     OnBaked      = BakedPizzaHandler.EatPizza;
 }
Пример #13
0
 public void ChangeBuilder(IPizzaBuilder builder)
 {
     this._builder = builder;
 }