aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-03 23:44:35 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-03 23:44:35 +0000
commitd18b5e9f7c90bf8b24146cff2eabf605889b4e38 (patch)
treea650d852fa855929e5e8416496d811c83a61a356
parentf1c584a0189213622976cded0bbb33359ba9a19d (diff)
downloadnewsaggregator-d18b5e9f7c90bf8b24146cff2eabf605889b4e38.tar.gz
newsaggregator-d18b5e9f7c90bf8b24146cff2eabf605889b4e38.tar.bz2
newsaggregator-d18b5e9f7c90bf8b24146cff2eabf605889b4e38.zip
Added comments
-rw-r--r--Aggregator/Parser/Download.cs12
1 files changed, 12 insertions, 0 deletions
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);
}
}