From d18b5e9f7c90bf8b24146cff2eabf605889b4e38 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali <aryadevchavali1@gmail.com> 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') 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 { + /// <summary> + /// Download source from a given site synchronously + /// </summary> + /// <param name="site">Site to download from</param> + /// <returns></returns> public static string DownloadXMLSync(string site) { using (var client = new WebClient()) { return client.DownloadString(site); } } + /// <summary> + /// Download source from a given site asynchronously + /// </summary> + /// <param name="site">Site to download from</param> + /// <returns></returns> public static Task<string> 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