Ejemplo n.º 1
0
 public ChampionBanInfoDTO[] GetChampionsForBan()
 {
     int Id = Invoke("gameService", "getChampionsForBan", new object[] { });
     while (!results.ContainsKey(Id))
         System.Threading.Thread.Sleep(10);
     ChampionBanInfoDTO[] result = new ChampionBanInfoDTO[results[Id].GetTO("data").GetArray("body").Length];
     for (int i = 0; i < results[Id].GetTO("data").GetArray("body").Length; i++)
     {
         result[i] = new ChampionBanInfoDTO((TypedObject)results[Id].GetTO("data").GetArray("body")[i]);
     }
     results.Remove(Id);
     return result;
 }
 public async Task<ChampionBanInfoDTO[]> GetChampionsForBan()
 {
     int Id = Invoke("gameService", "getChampionsForBan", new object[] { });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     ChampionBanInfoDTO[] result = new ChampionBanInfoDTO[results[Id].GetTO("data").GetArray("body").Length];
     for (int i = 0; i < results[Id].GetTO("data").GetArray("body").Length; i++)
     {
         result[i] = new ChampionBanInfoDTO((TypedObject)results[Id].GetTO("data").GetArray("body")[i]);
     }
     results.Remove(Id);
     return result;
 }