Exemplo n.º 1
0
        /// <summary>
        /// Gets all the games for a platform.
        /// </summary>
        /// <param name="platform">The platform to return games for</param>
        /// <returns>A collection of all the games on the platform</returns>
        public static async Task <ICollection <ApiGameSearchResult> > GetPlatformGames(ApiPlatformSearchResult platform)
        {
            ICollection <ApiGameSearchResult> games = await ApiGamesDb.GetPlatformGames(platform.ID)
                                                      .ConfigureAwait(false);

            foreach (ApiGameSearchResult game in games)
            {
                game.Platform = platform.Name;
            }

            return(games);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets all data for a specific platform.
 /// </summary>
 /// <param name="platform">The platform to return data for (can be found by using GetPlatformsList)</param>
 /// <returns>A Platform-object containing all the data about the platform, or null if no platform was found</returns>
 public static async Task <ApiPlatform> GetPlatform(ApiPlatformSearchResult platform)
 {
     return(await ApiGamesDb.GetPlatform(platform.ID).ConfigureAwait(false));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the data for a specific game.
 /// </summary>
 /// <param name="game">The game to return data for</param>
 /// <returns>A Game-object containing all the data about the game, or null if no game was found</returns>
 public static async Task <ApiGame> GetGame(ApiGameSearchResult game)
 {
     return(await ApiGamesDb.GetGame(game.ID)
            .ConfigureAwait(false));
 }