public void LinkEvents(RecipeEventTypes.PercentChangedHandler adjustPercentageHandler, RecipeEventTypes.WeightChangedHandler adjustWeightHandler, UpdateHydrationHandler calculateHydrationHandler, RecipeEventTypes.IngredientDeleteMe deleteIngredientHander) { PercentChanged += adjustPercentageHandler; WeightChanged += adjustWeightHandler; UpdateHydration += calculateHydrationHandler; DeleteMe += deleteIngredientHander; foreach (var ingredient in ingredients) { ingredient.LinkEvents(AdjustIngredientPercentages, adjustWeightHandler, calculateHydrationHandler, DeleteChild); } }
public void LinkEvents(RecipeEventTypes.PercentChangedHandler adjustPercentageHandler, RecipeEventTypes.WeightChangedHandler adjustWeightHandler, UpdateHydrationHandler calculateHydrationHandler, EntryModeChangedHandler entryModeHandler) { PercentChanged += adjustPercentageHandler; WeightChanged += adjustWeightHandler; UpdateHydration += calculateHydrationHandler; EntryModeChange += entryModeHandler; foreach (var ingredient in ingredients) { ingredient.LinkEvents(AdjustIngredientPercentages, adjustWeightHandler, calculateHydrationHandler, ChildEnteredEntryMode); } }