コード例 #1
0
 public override void Prepare()
 {
     Dough     = _ingredientFactory.CreateDough();
     Cheese    = _ingredientFactory.CreateCheese();
     Sauce     = _ingredientFactory.CreateSauce();
     Pepperoni = _ingredientFactory.CreatePepperoni();
 }
コード例 #2
0
 public override void Prepare()
 {
     Dough  = _ingredientFactory.CreateDough();
     Cheese = _ingredientFactory.CreateCheese();
     Sauce  = _ingredientFactory.CreateSauce();
     Veggie = _ingredientFactory.CreateVeggie();
 }
コード例 #3
0
 public override void Prepare()
 {
     Dough    = _ingredientFactory.CreateDough();
     Cheese   = _ingredientFactory.CreateCheese();
     Sauce    = _ingredientFactory.CreateSauce();
     Mushroom = _ingredientFactory.CreateMushrooms();
 }
コード例 #4
0
ファイル: Pizza.cs プロジェクト: hrai/design-patterns
 public Pizza(IIngredientFactory ingredientFactory)
 {
     IngredientFactory = ingredientFactory;
     Dough             = IngredientFactory.CreateDough();
     Sauce             = IngredientFactory.CreateSauce();
     Meat   = IngredientFactory.CreateMeat();
     Veggie = IngredientFactory.CreateVeggie();
 }
コード例 #5
0
        internal override string Prepare()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine($"Preparing {Name}");

            Dough  = IngredientFactory.CreateDough();
            Sauce  = IngredientFactory.CreateSauce();
            Cheese = IngredientFactory.CreateCheese();
            Clam   = IngredientFactory.CreateClams();

            return(sb.ToString());
        }