Exemplo n.º 1
0
 private void HandleActions(IAction action)
 {
     this._state = new CounterState(((SetCountAction)action).Count);
     BroadcastStateChange();
 }
Exemplo n.º 2
0
 public CounterStore(IActionDispatcher actionDispatcher)
 {
     _state = new CounterState(0);
     this.actionDispatcher = actionDispatcher;
     this.actionDispatcher.Subscript(HandleActions);
 }