public IEnumerable<TodoItem> GetActiveList()
        {
            this.GetList();
            var command = new FilterTodosByCompletion
                {
                    Input = new FilterTodosByCompletionInput(this.ViewModel.TodoItems, FilterTodosByCompletionType.HideCompleted)
                };
            command.Execute();

            ViewModel.TodoItems = command.Value.ToList();

            ViewModel.CurrentState = TodoListState.Active;

            return command.Value;
        }
示例#2
0
        public IEnumerable <TodoItem> GetCompletedList()
        {
            this.GetList();
            var command = new FilterTodosByCompletion
            {
                Input = new FilterTodosByCompletionInput(this.ViewModel.TodoItems, FilterTodosByCompletionType.ShowCompleted)
            };

            command.Execute();

            ViewModel.TodoItems = command.Value.ToList();

            ViewModel.CurrentState = TodoListState.Completed;

            return(command.Value);
        }