예제 #1
0
        private async Task GatherPlaytime()
        {
            Running = true;
            List <IPlay> plays = await Task.Run(() => dataProvider.GetPlaysAsync(UserName));

            foreach (var game in Owned.Union(PrevOwned))
            {
                game.MinPlayed = plays.Where(p => p.Game.Id == game.Id).Sum(p => p.Minutes);
            }
            Running = false;
        }