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);
        }
Exemplo n.º 2
0
 UserState GetUserState(BaseGameAction action)
 {
     return(GetUserState(action.User));
 }
Exemplo n.º 3
0
 UserView GetAnotherUserView(BaseGameAction action)
 {
     return(GetAnotherUserView(action.User));
 }