Beispiel #1
0
        public int Remove(RemoveOptions options)
        {
            TodoItem todoItem = new TodoItem(options.Text);

            if (_list.Remove(todoItem))
            {
                _textWriter.Invoke($"\"{options.Text}\" removed");
            }
            else
            {
                _textWriter.Invoke($"\"{options.Text}\" not found");
            }
            Save();

            return(0);
        }
Beispiel #2
0
        private static int RunRemove(RemoveOptions options)
        {
            TodoConsole console = new TodoConsole(WriteToConsole);

            return(console.Remove(options));
        }