示例#1
0
        public async Task HandleFetchClusterAction(FetchClusterAction action, IDispatcher dispatcher)
        {
            try
            {
                var cluster = await clusterService.GetClusterAsync(action.ClusterId);

                dispatcher.Dispatch(new FetchClusterSuccessAction(cluster));
            }
            catch (Exception e)
            {
                dispatcher.Dispatch(new FetchClusterFailureAction(e.Message));
            }
        }
示例#2
0
 public static ClusterState ReduceFetchClusterAction(ClusterState state, FetchClusterAction _) =>
 new ClusterState(state.Clusters, null, true, null);