public SearchingForMatchNotification AttachToQueue(MatchMakerParams matchMakerParams, string token)
 {
     int Id = Invoke("matchmakerService", "attachToQueue", new object[] { matchMakerParams.GetBaseTypedObject(), token });
     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 async Task<SearchingForMatchNotification> AttachToQueue(MatchMakerParams matchMakerParams, string accessToken)
 {
     TypedObject typedObject = new TypedObject(null);
     typedObject.Add("LEAVER_BUSTER_ACCESS_TOKEN", accessToken);
     int Id = Invoke("matchmakerService", "attachToQueue", new object[] { matchMakerParams.GetBaseTypedObject(), typedObject });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     SearchingForMatchNotification result = new SearchingForMatchNotification(messageBody);
     results.Remove(Id);
     return result;
 }
 public void AttachToQueue(MatchMakerParams matchMakerParams, string token, SearchingForMatchNotification.Callback callback)
 {
     SearchingForMatchNotification cb = new SearchingForMatchNotification(callback);
     InvokeWithCallback("matchmakerService", "attachToQueue",
         new object[] { matchMakerParams.GetBaseTypedObject(), token }, cb);
 }
 public async Task<SearchingForMatchNotification> AttachTeamToQueue(MatchMakerParams matchMakerParams)
 {
     int Id = Invoke("matchmakerService", "attachTeamToQueue", new object[] { matchMakerParams.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     SearchingForMatchNotification result = new SearchingForMatchNotification(messageBody);
     results.Remove(Id);
     return result;
 }