コード例 #1
0
 public async Task<SearchingForMatchNotification> AttachToQueue(MatchMakerParams matchMakerParams)
 {
     int Id = Invoke("matchmakerService", "attachToQueue", 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;
 }
コード例 #2
0
        public async Task<SearchingForMatchNotification> AttachToLowPriorityQueue(MatchMakerParams matchMakerParams, string accessToken)
        {
            TypedObject typedObject = new TypedObject(null);
            typedObject.Add("LEAVER_BUSTER_ACCESS_TOKEN", accessToken);
            int key = this.Invoke("matchmakerService", "attachToQueue", new object[]
			{
				matchMakerParams.GetBaseTypedObject(),
				typedObject
			});
            while (!this.results.ContainsKey(key))
            {
                await Task.Delay(10);
            }
            TypedObject tO = this.results[key].GetTO("data").GetTO("body");
            SearchingForMatchNotification result = new SearchingForMatchNotification(tO);
            this.results.Remove(key);
            return result;
        }
コード例 #3
0
 /// 37.)
 public void AttachToQueue(MatchMakerParams matchMakerParams, SearchingForMatchNotification.Callback callback)
 {
     SearchingForMatchNotification cb = new SearchingForMatchNotification(callback);
     InvokeWithCallback("matchmakerService", "attachToQueue", new object[] { matchMakerParams.GetBaseTypedObject() }, cb);
 }
コード例 #4
0
 public async Task<SearchingForMatchNotification> AttachToLowPriorityQueue(MatchMakerParams matchMakerParams, string accessToken)
 {
     TypedObject to = new TypedObject(null);
     to.Add("LEAVER_BUSTER_ACCESS_TOKEN", accessToken);
     int Id = Invoke("matchmakerService", "attachToQueue",
         new object[] { matchMakerParams.GetBaseTypedObject(), to });
     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;
 }