Created
January 10, 2015 06:32
-
-
Save AlexArchive/6f4e5b339893e2261621 to your computer and use it in GitHub Desktop.
This file contains 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
static async Task<string> DownloadAllAsync(IEnumerable<string> locations) | |
{ | |
var client = new HttpClient(); | |
var downloads = locations.Select(client.GetStringAsync); | |
var downloadTasks = downloads.ToArray(); | |
var pages = await Task.WhenAll(downloadTasks); | |
return string.Concat(pages); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment