public static DatacenterState ReduceSelectDatacenterNodeFailureAction(DatacenterState state, SelectDatacenterNodeFailureAction action) => new DatacenterState(state.Nodes, null, false, action.ErrorMessage);
private void DatacenterState_StateChanged(object sender, DatacenterState e) { StateHasChanged(); }
public static DatacenterState ReduceSelectDatacenterNodeSuccessAction(DatacenterState state, SelectDatacenterNodeSuccessAction action) => new DatacenterState(state.Nodes, action.SelectedNode, false, null);
public static DatacenterState ReduceSelectDatacenterNodeAction(DatacenterState state, SelectDatacenterNodeAction action) => new DatacenterState(state.Nodes, null, true, null);
public static DatacenterState ReduceFetchDatacenterFailureAction(DatacenterState state, FetchDatacenterFailureAction action) => new DatacenterState(null, state.SelectedNode, false, action.ErrorMessage);
public static DatacenterState ReduceFetchDatacenterSuccessAction(DatacenterState state, FetchDatacenterSuccessAction action) => new DatacenterState(action.Nodes.ToArray(), state.SelectedNode, false, null);
public static DatacenterState ReduceFetchDatacenterAction(DatacenterState state, FetchDatacenterAction _) => new DatacenterState(null, state.SelectedNode, true, null);