public SearchingForMatchNotification AttachTeamToQueue(MatchMakerParamsForTeam matchMakerParams) { int Id = Invoke("matchmakerService", "attachTeamToQueue", new object[] { matchMakerParams.GetBaseTypedObject() }); while (!results.ContainsKey(Id)) System.Threading.Thread.Sleep(10); TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); SearchingForMatchNotification result = new SearchingForMatchNotification(messageBody); results.Remove(Id); return result; }
public void AttachTeamToQueue(MatchMakerParamsForTeam matchMakerParams, SearchingForMatchNotification.Callback callback) { SearchingForMatchNotification cb = new SearchingForMatchNotification(callback); InvokeWithCallback("matchmakerService", "attachTeamToQueue", new object[] { matchMakerParams.GetBaseTypedObject() }, cb); }