Ejemplo n.º 1
0
 public static VotePageState VoteReducer(VotePageState preVotePageState, VoteAction action)
 {
     preVotePageState.Items.Remove(action.Item);
     preVotePageState.CurrentItem = preVotePageState.NextItem;
     preVotePageState.NextItem    = preVotePageState.Items.SingleOrDefault();
     return(preVotePageState);
 }
Ejemplo n.º 2
0
 public static VotePageState ReduceVotePageState(VotePageState preVotePageState, IAction action)
 {
     if (action is VoteAction)
     {
         return(VoteReducer(preVotePageState, (VoteAction)action));
     }
     return(preVotePageState);
 }