aboutsummaryrefslogtreecommitdiff
path: root/Aggregator/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'Aggregator/Parser')
-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);
}
}