Пример #1
0
 private void HandleActions(IAction action)
 {
     this._state = new CounterState(((SetCountAction)action).Count);
     BroadcastStateChange();
 }
Пример #2
0
 public CounterStore(IActionDispatcher actionDispatcher)
 {
     _state = new CounterState(0);
     this.actionDispatcher = actionDispatcher;
     this.actionDispatcher.Subscript(HandleActions);
 }