Esempio n. 1
0
 private void CompleteMatch(Region region, MyMatch match)
 {
     foreach (MyParticipant p in match.Participants)
     {
         ChooseApiKey();
         System.Threading.Thread.Sleep(500);
         MySummoner sum = new MySummoner(Task.Run(async() => { return(await api.Summoner.GetSummonerBySummonerIdAsync(region, p.SummonerId)); }).Result);
         if (!summonersCompletedList.Contains(sum.SummonerId))
         {
             Summoners.AddSummoner(sum);
             seedQueue.Enqueue(sum);
             Console.WriteLine("Summoner added!");
         }
     }
     matchCompletedList.Add(match.MatchId);
     Matches.CompleteMatch(match);
     Console.WriteLine("Match added");
 }