Exemplo n.º 1
0
        public static StatisticsState Reduce(StatisticsState state, JArray actions)
        {
            var statistics = state.Statistics.Clone();

            foreach (JObject action in actions)
            {
                statistics.Patch(action.ToObject <Patch>());
            }

            return(StatisticsState.WithStatistics(statistics));
        }
Exemplo n.º 2
0
 internal StatisticsStore()
 {
     statisticsState = StatisticsState.WithStatistics(new PatchDocument());
 }