public void RetrieveContests() { CurrentFullScreenProcess = "Retrieving contests..."; ThreadPool.QueueUserWorkItem(q => { var service = new LineupGeneratorService(); Contests = service.Contests.Select(c => new ContestViewModel(c)).ToArray(); CurrentFullScreenProcess = null; }); }
private void RetrievePlayerCard() { if (_playerCard == null && IsExpanded && !IsRetrievingPlayerCard) { IsRetrievingPlayerCard = true; ThreadPool.QueueUserWorkItem(q => { var service = new LineupGeneratorService(); PlayerCard = service.GetPlayerCard(Contest.ID, Player.ID); IsRetrievingPlayerCard = false; }); } }