Exemple #1
0
 private void SetState(ExpendoObject prevState)
 {
     _subscribers.ForEach(sub =>
     {
         sub.callback(_state);
     });
 }
Exemple #2
0
        public void Dispatch(ExpendoObject action)
        {
            _reducers.ForEach(reducer =>
            {
                string key  = reducer.GetKey();
                _state[key] = reducer.ReduceAny(_state[key], action);
            });

            SetState(_state);
        }
Exemple #3
0
 public object ReduceAny(object state, ExpendoObject action)
 {
     return(this.Reduce((TState)state, action));
 }
Exemple #4
0
 public abstract TState Reduce(TState state, ExpendoObject action);
Exemple #5
0
 public Store(ExpendoObject state)
 {
     _state = state;
 }
Exemple #6
0
 public static void Dispatch(ExpendoObject action)
 {
     Instance.store.Dispatch(action);
 }