Ejemplo n.º 1
0
        async Task <GameInfo> IGameLocalizationStore.ResolveLocalizedGameInfoAsync(string language, string twitchCategoryId, CancellationToken cancellationToken)
        {
            try
            {
                TableOperation retrieveOperation = TableOperation.Retrieve <GameLocalizationInfoEntity>(twitchCategoryId, language);
                TableResult    result            = await _table.ExecuteAsync(retrieveOperation, cancellationToken);

                GameLocalizationInfoEntity gameInfoEntity = result.Result as GameLocalizationInfoEntity;
                if (gameInfoEntity == null)
                {
                    return(null);
                }

                return(gameInfoEntity.ToGameInfo());
            }
            catch (StorageException e)
            {
                _logger.LogError(e, e.Message);
                throw;
            }
        }