Esempio n. 1
0
        private static Recipe FormRecipe(RecipeController recCont)
        {
            Console.Write("Enter recipe name:");
            string name = Console.ReadLine();

            Console.Write("Enter recipe description:");
            string description = Console.ReadLine();

            return(recCont.PrepareRecipe(name, description));
        }
Esempio n. 2
0
        private static Recipe FormRecipe(RecipeController recCont)
        {
            Console.Write("Enter recipe name:");
            string name = Console.ReadLine();

            Console.Write("Enter recipe description:");
            string        description = Console.ReadLine();
            List <string> steps       = new List <string>();

            Console.WriteLine("Enter sequence of recipe steps or \"-1\" to stop recording ");
            while (true)
            {
                string step = Console.ReadLine().Trim();
                if (step == "-1")
                {
                    break;
                }
                steps.Add(step);
            }
            return(recCont.PrepareRecipe(name, description, steps));
        }