protected async Task <Game> TryUpdateGame(BaseGameAction action, IDispatcher dispatcher) { if (string.IsNullOrWhiteSpace(action.InstanceName)) { return(null); } dispatcher.Dispatch(new FetchingGameAction(true)); await Task.Delay(1000); var game = await this.apiClient.WithRetry(c => c.Read(action.InstanceName)); if (game != null) { dispatcher.Dispatch(new UpdateGameStateAction(game)); } dispatcher.Dispatch(new FetchingGameAction(false)); return(game); }
UserState GetUserState(BaseGameAction action) { return(GetUserState(action.User)); }
UserView GetAnotherUserView(BaseGameAction action) { return(GetAnotherUserView(action.User)); }