Exemplo n.º 1
0
 public override void Execute()
 {
     foreach (Recipe recipe in recipeManager.GetRecipes())
     {
         recipeDrawer.Draw(recipe);
     }
 }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        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);
            }
        }