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