Esempio n. 1
0
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {Name}");
     Dough  = myPizzaIngredientFactory.CreateDough();
     Sauce  = myPizzaIngredientFactory.CreateSauce();
     Cheese = myPizzaIngredientFactory.CreateCheese();
 }
Esempio n. 2
0
 public override void Prepare()
 {
     Console.WriteLine("Preparing " + Name);
     Dough  = _ingredientFactory.CreateDough();
     Sauce  = _ingredientFactory.CreateSauce();
     Cheese = _ingredientFactory.CreateCheese();
 }
Esempio n. 3
0
 internal override void Prepare()
 {
     Console.WriteLine("Preparing " + _name);
     _dough  = _ingredientFactory.CreateDough();
     _sauce  = _ingredientFactory.CreateSauce();
     _cheese = _ingredientFactory.CreateCheese();
 }
Esempio n. 4
0
 public override void Prepare()
 {
     "Preparing: {0}".P(Name);
     Dough  = _ingredientFactory.CreateDough();
     Sauce  = _ingredientFactory.CreateSauce();
     Cheese = _ingredientFactory.CreateCheese();
 }
Esempio n. 5
0
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {this.Name}");
     this.Dough   = _ingredientFactory.CreateDough();
     this.Sauce   = _ingredientFactory.CreateSauce();
     this.Veggies = _ingredientFactory.CreateVeggies();
 }
Esempio n. 6
0
 public void Prepare()
 {
     Cheese  = _ingredientFactory.CreateCheese();
     Dough   = _ingredientFactory.CreateDough();
     Sauce   = _ingredientFactory.CreateSauce();
     Veggies = _ingredientFactory.CreateVeggies();
 }
Esempio n. 7
0
 public override void Prepare()
 {
     Console.WriteLine(String.Format("Preparing {0}", Name));
     Dough  = moIngredientFactory.CreateDough();
     Sauce  = moIngredientFactory.CreateSauce();
     Cheese = moIngredientFactory.CreateCheese();
 }
Esempio n. 8
0
 public override void Prepare()
 {
     System.Console.WriteLine($"Preparing {name}");
     dough  = factory.CreateDough();
     sauce  = factory.CreateSauce();
     cheese = factory.CreateCheese();
 }
 public override void Prepare()
 {
     this.cheese    = _ingredientFactory.CreateCheese();
     this.dough     = _ingredientFactory.CreateDough();
     this.sauce     = _ingredientFactory.CreateSauce();
     this.pepperoni = _ingredientFactory.CreatePepperoni();
 }
Esempio n. 10
0
 public override void Prepare()
 {
     Console.WriteLine("Preparing {0}", name);
     dough     = pizzaIngredientFactory.CreateDough();
     sauce     = pizzaIngredientFactory.CreateSauce();
     pepperoni = pizzaIngredientFactory.CreatePepperoni();
 }
Esempio n. 11
0
 public override void Prepare()
 {
     Console.WriteLine("Preparing {0}", name);
     dough  = ingredientFactory.CreateDough();
     sauce  = ingredientFactory.CreateSauce();
     cheese = ingredientFactory.CreateCheese();
 }
Esempio n. 12
0
 public PepperoniPizzaNY()
 {
     pizzaIngredientFactory = new PizzaIngredientFactoryNY();
     name = "PepperoniPizza NY";
     dough = pizzaIngredientFactory.CreateDough().GetDough();
     sauce = pizzaIngredientFactory.CreateSauce().GetSauce(); ;
 }
Esempio n. 13
0
 public virtual void Prepare()
 {
     IngredientFactory.CreateDough().Use();
     IngredientFactory.CreateSauce().Use();
     IngredientFactory.CreateCheese().Use();
     IngredientFactory.CreateClam().Use();
 }
Esempio n. 14
0
        public override string Prepare()

        {
            dough = ingredientFactory.CreateDough();

            sauce = ingredientFactory.CreateSauce();

            cheese = ingredientFactory.CreateCheese();

            clam = ingredientFactory.CreateClam();



            StringBuilder sb = new StringBuilder();

            sb.Append("Preparing " + Name + "\n");

            sb.Append(dough.toString() + "\n");

            sb.Append(sauce.toString() + "\n");

            sb.Append(cheese.toString() + "\n");

            sb.Append(clam.toString());



            return(sb.ToString());
        }
Esempio n. 15
0
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {Name}");
     this.dough  = _ingredientFactory.CreateDough();
     this.sauce  = _ingredientFactory.CreateSauce();
     this.cheese = _ingredientFactory.CreateCheese();
 }
Esempio n. 16
0
 //Метод готовит пиццу с сыром. Когда ему нужны игредиенты, он запрашиват у фабрики
 public override void Prepare()
 {
     Console.WriteLine($"Подготовка {name}");
     dough  = IngredientFactory.CreateDough();
     sauce  = IngredientFactory.CreateSauce();
     cheese = IngredientFactory.CreateCheese();
 }
Esempio n. 17
0
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {Name}");
     Dough   = IngredientFactory.CreateDough();
     Sauce   = IngredientFactory.CreateSauce();
     Cheese  = IngredientFactory.CreateCheese();
     Veggies = IngredientFactory.CreateVeggies().ToList();
 }
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {Name}");
     Dough     = _ingredientFactory.CreateDough();
     Sauce     = _ingredientFactory.CreateSauce();
     Cheese    = _ingredientFactory.CreateCheese();
     Pepperoni = _ingredientFactory.CreatePepperoni();
 }
 public override void Prepare()
 {
     Console.WriteLine("Preparing " + Name);
     dough   = _ingredientFactory.CreateDough();
     sauce   = _ingredientFactory.CreateSauce();
     cheese  = _ingredientFactory.CreateCheese();
     veggies = _ingredientFactory.CreateVeggies();
 }
 public override void Prepare()
 {
     Console.WriteLine("Preparing {0}", Name);
     Dough   = ingredientFactory.CreateDough();
     Sauce   = ingredientFactory.CreateSauce();
     Cheese  = ingredientFactory.CreateCheese();
     Veggies = ingredientFactory.CreateVeggies();
 }
Esempio n. 21
0
 public override void Prepare()
 {
     Console.WriteLine($"Preparing { Name}");
     Dough = _pizzaIngredientFactory.CreateDough();
     Dough.Dough();
     Sauce = _pizzaIngredientFactory.CreateSauce();
     Sauce.Sauce();
 }
 public override void Prepare()
 {
     Console.WriteLine("Preparing " + name);
     _dough  = _ingredientFactory.CreateDough();
     _sauce  = _ingredientFactory.CreateSauce();
     _cheese = _ingredientFactory.CreateCheese();
     _clams  = _ingredientFactory.CreateClams();
 }
Esempio n. 23
0
 public override void Prepare()
 {
     WriteLine($"Prepararando: {Name}");
     Dough   = _ingredientFactory.CreateDough();
     Cheese  = _ingredientFactory.CreateCheese();
     Sauce   = _ingredientFactory.CreateSauce();
     Veggies = _ingredientFactory.CreateVeggies();
 }
Esempio n. 24
0
 public override void Prepare()
 {
     Console.WriteLine("Preaparing " + Name);
     dough  = pizzaIngredientFactory.CreateDough();
     sauce  = pizzaIngredientFactory.CreateSauce();
     cheese = pizzaIngredientFactory.CreateCheese();
     clams  = pizzaIngredientFactory.CreateClam();
 }
Esempio n. 25
0
        public override void Prepare()
        {
            Console.WriteLine("Preparing " + this.Name);

            this.Dough  = ingredientFactory.CreateDough();
            this.Sauce  = ingredientFactory.CreateSauce();
            this.Cheese = ingredientFactory.CreateCheese();
        }
Esempio n. 26
0
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {name}");
     dough     = ingredientFactory.CreateDough();
     sauce     = ingredientFactory.CreateSauce();
     cheese    = ingredientFactory.CreateCheese();
     clam      = ingredientFactory.CreateClam();
     pepperoni = ingredientFactory.CreatePepperoni();
 }
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {Name}");
     dough     = _ingredientFactory.CreateDough();
     sauce     = _ingredientFactory.CreateSauce();
     cheese    = _ingredientFactory.CreateCheese();
     veggies   = _ingredientFactory.CreateVeggies();
     pepperoni = _ingredientFactory.CreatePepperoni();
 }
 public override void Prepare()
 {
     Console.WriteLine("Preparing " + Name);
     Sauce     = ingredientFactory.CreateSauce();
     Cheese    = ingredientFactory.CreateCheese();
     Clam      = ingredientFactory.CreateClam();
     Dough     = ingredientFactory.CreateDough();
     Pepperoni = ingredientFactory.CreatePepperoni();
 }
Esempio n. 29
0
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {GetType().Name}");
     Dough   = _pizzaIngredientFactory.CreateDough();
     Clam    = _pizzaIngredientFactory.CreateClam();
     Cheese  = _pizzaIngredientFactory.CreateCheese();
     Veggies = _pizzaIngredientFactory.CreateVegetables();
     Sauce   = _pizzaIngredientFactory.CreateSauce();
 }
Esempio n. 30
0
 public override void Prepare()
 {
     Console.WriteLine("Preparing " + Name);
     Dough     = _pizzaIngredientFactory.CreateDough();
     Sauce     = _pizzaIngredientFactory.CreateSauce();
     Cheese    = _pizzaIngredientFactory.CreateCheese();
     Veggies   = _pizzaIngredientFactory.CreateVeggies();
     Pepperoni = _pizzaIngredientFactory.CreatePepperoni();
 }
Esempio n. 31
0
 public GreekPizzaNY()
 {
     //直接使用相對應的原料工廠
     pizzaIngredientFactory = new PizzaIngredientFactoryNY();
     name = "GreekPizza NY";
     //找出原料(CreateDough)並取得原料(GetDough)
     //且不需要知道是向誰取得
     dough = pizzaIngredientFactory.CreateDough().GetDough();
     sauce = pizzaIngredientFactory.CreateSauce().GetSauce(); ;
 }
Esempio n. 32
0
 public override void Prepare()
 {
     Console.WriteLine("Preparing " + _name);
     _dough = _ingredientFactory.CreateDough();
     Console.WriteLine("Tossing " + _dough);
     _sauce = _ingredientFactory.CreateSauce();
     Console.WriteLine("Adding " + _sauce);
     _cheese = _ingredientFactory.CreateCheese();
     Console.WriteLine("Adding " + _cheese);
 }