Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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();
            }
        }