Beispiel #1
0
 public static ImmutableArray<Todo> CompleteAllTodosReducer(ImmutableArray<Todo> previousState, CompleteAllTodosAction action)
 {
     return previousState
         .Select(x => new Todo
             {
                 Id = x.Id,
                 Text = x.Text,
                 IsCompleted = action.IsCompleted
             })
         .ToImmutableArray();
 }
Beispiel #2
0
 public static ImmutableArray <Todo> CompleteAllTodosReducer(ImmutableArray <Todo> previousState, CompleteAllTodosAction action)
 {
     return(previousState
            .Select(x => new Todo
     {
         Id = x.Id,
         Text = x.Text,
         IsCompleted = action.IsCompleted
     })
            .ToImmutableArray());
 }