예제 #1
0
        public static ImmutableArray<Todo> DeleteTodoReducer(ImmutableArray<Todo> previousState, DeleteTodoAction action)
        {
            var todoToDelete = previousState.First(todo => todo.Id == action.TodoId);

            return previousState.Remove(todoToDelete);
        }
예제 #2
0
        public static ImmutableArray <Todo> DeleteTodoReducer(ImmutableArray <Todo> previousState, DeleteTodoAction action)
        {
            var todoToDelete = previousState.First(todo => todo.Id == action.TodoId);

            return(previousState.Remove(todoToDelete));
        }