From d18b5e9f7c90bf8b24146cff2eabf605889b4e38 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 3 Feb 2019 23:44:35 +0000 Subject: Added comments --- Aggregator/Parser/Download.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Aggregator/Parser/Download.cs') diff --git a/Aggregator/Parser/Download.cs b/Aggregator/Parser/Download.cs index c90dc0a..eb46dd0 100644 --- a/Aggregator/Parser/Download.cs +++ b/Aggregator/Parser/Download.cs @@ -3,14 +3,26 @@ using System.Threading.Tasks; namespace Parser { public static class Download { + /// + /// Download source from a given site synchronously + /// + /// Site to download from + /// public static string DownloadXMLSync(string site) { using (var client = new WebClient()) { return client.DownloadString(site); } } + /// + /// Download source from a given site asynchronously + /// + /// Site to download from + /// public static Task DownloadXML(string site) { using (var client = new WebClient()) { + /* TODO: Find some way to circumvent creating a new WebClient every download + *2019-02-03 23:43*/ return client.DownloadStringTaskAsync(site); } } -- cgit v1.2.3-13-gbd6f