Exemplo n.º 1
0
 public override void Prepare()
 {
     Console.WriteLine("Preparing..." + Name);
     Dough  = pizzaIngredient.CreateDough();
     Sauce  = pizzaIngredient.CreateSauce();
     Cheese = pizzaIngredient.CreateCheese();
 }
Exemplo n.º 2
0
 //披萨获取原料
 //获取工厂的原料,不在乎是什么工厂
 //Create会返回你需要的哪个工厂的哪个原料
 public override void Prepare()
 {
     Console.WriteLine("准备 " + _name);
     _dough  = _ingredientFactory.CreateDough();
     _sauce  = _ingredientFactory.CreateSauce();
     _cheese = _ingredientFactory.CreateCheese();
 }
Exemplo n.º 3
0
 internal override void Prepare()
 {
     Debug.WriteLine("Preparing " + name);
     dough  = ingredientFactory.CreateDough();
     sauce  = ingredientFactory.CreateSauce();
     cheese = ingredientFactory.CreateCheese();
 }
 public override void Prepare()
 {
     Console.WriteLine("Preparing " + Name);
     Dough  = _ingredientFactory.CreateDough();
     Sauce  = _ingredientFactory.CreateSauce();
     Cheese = _ingredientFactory.CreateCheese();
 }
 public override void Prepare()
 {
     console.WriteLine("Preparing " + name);
     dough  = ingredientFactory.CreateDough();
     sauce  = ingredientFactory.CreateSauce();
     Cheese = ingredientFactory.CreateCheese();
 }
        public override void Prepare()
        {
            IDough dough = PizzaIngredientFactory.CreateDough();
            ISauce sauce = PizzaIngredientFactory.CreateSauce();

            Console.WriteLine("Preparing Pizza {0}, {1}", dough.Description, sauce.Description);
        }
Exemplo n.º 7
0
 public override void prepare()
 {
     Console.WriteLine("Preparing " + name);
     dough   = ingredientFactory.CreateDough();
     sauce   = ingredientFactory.CreateSauce();
     cheese  = ingredientFactory.CreateCheese();
     veggies = ingredientFactory.CreateVeggies();
 }
Exemplo n.º 8
0
 public override void Prepare()
 {
     Console.WriteLine("Preparing " + GetName());
     dough  = ingredientFactory.CreateDough();
     sauce  = ingredientFactory.CreateSauce();
     cheese = ingredientFactory.CreateCheese();
     clam   = ingredientFactory.CreateClam();
 }
Exemplo n.º 9
0
 public override void Prepare()
 {
     Console.WriteLine("Preparing {0}", Name);
     Dough  = pizzaIngredientFactory.CreateDough();
     Sauce  = pizzaIngredientFactory.CreateSauce();
     Cheese = pizzaIngredientFactory.CreateCheese();
     Console.WriteLine("Ingredients: Dough: {0} - Sauce: {1} - Cheese: {2}", Dough.ToString(), Sauce.ToString(), Cheese.ToString());
 }
Exemplo n.º 10
0
 internal override void Prepare()
 {
     Debug.WriteLine("Preparing " + name);
     dough     = ingredientFactory.CreateDough();
     sauce     = ingredientFactory.CreateSauce();
     cheese    = ingredientFactory.CreateCheese();
     veggies   = ingredientFactory.CreateVeggies();
     pepperoni = ingredientFactory.CreatePepperoni();
 }
Exemplo n.º 11
0
 public override void prepare()
 {
     dough  = ingredientFactory.CreateDough();
     cheese = ingredientFactory.CreateCheese();
     sauce  = ingredientFactory.CreateSauce();
 }
Exemplo n.º 12
0
 public override void Prepare()
 {
     Console.WriteLine($"Preparing {Name}");
     Dough = ingredientFactory.CreateDough();
     Sauce = ingredientFactory.CreateSauce();
 }