예제 #1
0
        public void GatherIngredients(Domain.Cake cake)
        {
            var cakeIngredients = new List <IRule>
            {
                new IngredientsForStrawberryCheeseCake(cake),
                new IngredientsForTaisanCake(cake)
            };

            foreach (var cakeIngredient in cakeIngredients)
            {
                cakeIngredient.ApplyRule();
            }
        }
예제 #2
0
        public void Mix(Domain.Cake cake)
        {
            var cakeMixes = new List <IRule>
            {
                //new MixForCheeseCake(cake),
                //new MixForButter(cake)
                //new MixForChiffon(cake)
            };

            foreach (var cakeMix in cakeMixes)
            {
                cakeMix.ApplyRule();
            }
        }