Exemplo n.º 1
0
        public ReduxGrainState <TState> Execute(ReduxGrainState <TState> previous, IAction action)
        {
            var nextState  = this.reducer(previous.State, action);
            var nextSerial = previous.Serial + 1;
            var next       = new ReduxGrainState <TState>(nextState, nextSerial);

            next.UnsavedActions.Add(new TableStorableAction(DateTimeOffset.UtcNow, nextSerial, action));
            return(next);
        }
Exemplo n.º 2
0
 public ReduxGrainStore(Reducer <TState> reducer, ReduxGrainState <TState> initialState, params Middleware <TState>[] middlewares)
     : base(new ReduxGrainReducer <TState>((s, a) => reducer(s, a)).Execute, initialState)
 {
 }