Created
May 31, 2018 20:22
-
-
Save GrillPhil/d991823e7b35aa31a63cb71c87d21b11 to your computer and use it in GitHub Desktop.
Step 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var entryTasks = new List<Task<IEnumerable<TimeEntry>>>(); | |
foreach (var project in projects) | |
{ | |
entryTasks.Add(GetTimeEntriesForProject(httpClient, tenant, apiKey, baseUrl, project.Id)); | |
} | |
await Task.WhenAll(entryTasks); | |
foreach (var task in entryTasks) | |
{ | |
projects.Single(p => p.Id == task.Result.First().ProjectId).ConsumedBudget = task.Result.Sum(e => e.Minutes); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment