public void GatherIngredients(Domain.Cake cake) { var cakeIngredients = new List <IRule> { new IngredientsForStrawberryCheeseCake(cake), new IngredientsForTaisanCake(cake) }; foreach (var cakeIngredient in cakeIngredients) { cakeIngredient.ApplyRule(); } }
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(); } }