Пример #1
0
        public void setCurrentRecipe(RecipeModel recipeModel)
        {
            var recipe = recipeManager.FindRecipe(recipeModel.Name);

            currentRecipe = new RecipeDescriptionModel(recipe);
            RaisePropertyChanged("CurrentRecipe");
        }
Пример #2
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);
            }
        }