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