Exemplo n.º 1
0
 public static async Task<GameService.JsGameMap[]> GetMaps(RiotAccount account)
 {
   GameMap[] maps = await account.InvokeCachedAsync<GameMap[]>("gameMapService", "getGameMapList", TimeSpan.FromDays(1.0));
   return Enumerable.ToArray<GameService.JsGameMap>((IEnumerable<GameService.JsGameMap>) Enumerable.OrderBy<GameService.JsGameMap, string>(Enumerable.Select<GameMap, GameService.JsGameMap>(Enumerable.Where<GameMap>((IEnumerable<GameMap>) maps, (Func<GameMap, bool>) (x => x.MapId != 4)), (Func<GameMap, GameService.JsGameMap>) (x => new GameService.JsGameMap()
   {
     Id = x.MapId,
     Name = GameService.TransformMapDisplayName(x.DisplayName),
     Players = x.TotalPlayers
   })), (Func<GameService.JsGameMap, string>) (x => x.Name)));
 }
Exemplo n.º 2
0
 public static async Task<GameService.JsGameMap[]> GetMaps(RiotAccount account)
 {
     GameMap[] gameMapArray = await account.InvokeCachedAsync<GameMap[]>("gameMapService", "getGameMapList", TimeSpan.FromDays(1));
     GameMap[] gameMapArray1 = gameMapArray;
     IEnumerable<GameMap> mapId =
         from x in (IEnumerable<GameMap>)gameMapArray1
         where x.MapId != 4
         select x;
     IEnumerable<GameService.JsGameMap> jsGameMap =
         from x in mapId
         select new GameService.JsGameMap()
         {
             Id = x.MapId,
             Name = GameService.TransformMapDisplayName(x.DisplayName),
             Players = x.TotalPlayers
         };
     GameService.JsGameMap[] array = (
         from x in jsGameMap
         orderby x.Name
         select x).ToArray<GameService.JsGameMap>();
     return array;
 }