Ejemplo n.º 1
0
        public static NodeViewState ReduceFetchDataResultAction(NodeViewState state, NodeViewResultAction action)
        {
            var nvs = new NodeViewState(
                isLoading: false,
                billBoard: action.billBoardResult,
                NodeStatus: action.nodeStatusResult,
                ipdb: action.ipDbFn);

            nvs.Id        = 0;          // create new for liteDB
            nvs.TimeStamp = DateTime.UtcNow;
            return(nvs);
        }
Ejemplo n.º 2
0
        public static NodeViewState ReduceLoadHistoryResultAction(NodeViewState state, LoadHistoryAction action)
        {
            var nvs = new NodeViewState(
                isLoading: false,
                billBoard: action.historyState.bb,
                NodeStatus: action.historyState.nodeStatus,
                ipdb: action.historyState.ipDbFn);

            nvs.Id        = action.historyState.Id;
            nvs.TimeStamp = action.historyState.TimeStamp;
            return(nvs);
        }
Ejemplo n.º 3
0
 public static NodeViewState ReduceFetchDataAction(NodeViewState state, NodeViewAction action) =>
 new NodeViewState(
     isLoading: true,
     billBoard: action.historyState?.bb,
     NodeStatus: action.historyState?.nodeStatus,
     ipdb: action.historyState?.ipDbFn);