public static void AddTodoItem(this TodoListState todoList, int itemNumber, string itemText)
 {
     if (todoList.Items.ContainsKey(itemNumber))
     {
         throw new ArgumentException("This list already has an item with that number");
     }
     todoList.Apply(new TodoItemAdded(todoList.Id, itemText, itemNumber));
 }
 public static void UncheckTodoItem(this TodoListState todoList, int itemNumber)
 {
     todoList.Apply(new TodoItemUnchecked(todoList.Id, itemNumber));
 }
 public static void NameTodoList(this TodoListState todoList, string name)
 {
     todoList.Apply(new TodoListNamed(todoList.Id, name));
 }