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); }
private static int RunRemove(RemoveOptions options) { TodoConsole console = new TodoConsole(WriteToConsole); return(console.Remove(options)); }