Ejemplo n.º 1
0
        public static GameViewModel OwnedGameToGame(OwnedGameModel game)
        {
            if (game == null)
            {
                return(null);
            }

            string url = Extensions.Valid(game.ImgLogoUrl)
                ? $"http://media.steampowered.com/steamcommunity/public/images/apps/{game.AppId}/{game.ImgLogoUrl}.jpg"
                : null;

            return(new GameViewModel(game.AppId)
            {
                IconUrl = url,
                Name = game.Name
            });
        }
 private static Game ConstructGame(OwnedGameModel gameToConstruct)
 {
     return(new Game(gameToConstruct.Name, @"steam://rungameid/" + gameToConstruct.AppId, new GameTime(Convert.ToInt32(gameToConstruct.PlaytimeForever.TotalMinutes)), true));
 }