public async Task<RecentGames> GetRecentGames(Double accountId) { int Id = Invoke("playerStatsService", "getRecentGames", new object[] { accountId }); while (!results.ContainsKey(Id)) await Task.Delay(10); TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); RecentGames result = new RecentGames(messageBody); results.Remove(Id); return result; }
/// 22.) public void GetRecentGames(Double accountId, RecentGames.Callback callback) { RecentGames cb = new RecentGames(callback); InvokeWithCallback("playerStatsService", "getRecentGames", new object[] { accountId }, cb); }