private void SetState(ExpendoObject prevState) { _subscribers.ForEach(sub => { sub.callback(_state); }); }
public void Dispatch(ExpendoObject action) { _reducers.ForEach(reducer => { string key = reducer.GetKey(); _state[key] = reducer.ReduceAny(_state[key], action); }); SetState(_state); }
public object ReduceAny(object state, ExpendoObject action) { return(this.Reduce((TState)state, action)); }
public abstract TState Reduce(TState state, ExpendoObject action);
public Store(ExpendoObject state) { _state = state; }
public static void Dispatch(ExpendoObject action) { Instance.store.Dispatch(action); }