public override void Execute() { foreach (Recipe recipe in recipeManager.GetRecipes()) { recipeDrawer.Draw(recipe); } }
public void Draw(Recipe model) { Console.Write("Recipe: "); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine(model.Name); Console.ResetColor(); foreach (Component component in model.Components) { Console.Write('\t'); componentDrawer.Draw(component); } }
public override void Execute() { try { string recipeName = inputProvider.ReadInput("recipe name"); Recipe recipe = recipeManager.FindRecipe(recipeName); recipeDrawer.Draw(recipe); } catch (RecipeNotFoundBusinessException exception) { throw new PresentationException($"Cannot find recipe '{exception.RecipeName}'.", exception); } }