Пример #1
0
        static void ExecuteAction(Todos todos, string action)
        {
            switch (action)
            {
            case "add":
                Console.WriteLine("\nName the task to add :");
                todos.AddTodo(Console.ReadLine());
                break;

            case "toggle":
                Console.WriteLine("\nName the task to toggle :");
                todos.ToggleDone(Console.ReadLine());
                break;

            case "clean":
                todos.RemoveDones();
                break;

            default:
                Console.WriteLine($"Unknown command :/");
                break;
            }
        }