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

            _list.Add(todoItem);
            Save();

            _textWriter.Invoke($"Item \"{todoItem.Description}\" added. Item count = {_list.Count}");

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

            return(console.Add(options));
        }