コード例 #1
0
        public Drink OrderDrink(DrinkType drinkType, List <Topping> toppings)
        {
            _drinkBuilder.Init();
            // REMOVE _drinkBuilder = new DrinkBuilder();
            _drinkBuilder.SetType(drinkType);

            foreach (Topping topping in toppings)
            {
                _drinkBuilder.AddTopping(topping);
            }
            return(_drinkBuilder.Build());
        }