From 496396683c6fa15f2daf3c27567cbd26b7941e7c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 2 Feb 2019 13:42:52 +0000 Subject: Made a static class to handle downloads --- Aggregator/Parser/Class1.cs | 6 ------ Aggregator/Parser/Download.cs | 11 +++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) delete mode 100644 Aggregator/Parser/Class1.cs create mode 100644 Aggregator/Parser/Download.cs diff --git a/Aggregator/Parser/Class1.cs b/Aggregator/Parser/Class1.cs deleted file mode 100644 index 635f2eb..0000000 --- a/Aggregator/Parser/Class1.cs +++ /dev/null @@ -1,6 +0,0 @@ -using System; - -namespace Parser { - public class Class1 { - } -} diff --git a/Aggregator/Parser/Download.cs b/Aggregator/Parser/Download.cs new file mode 100644 index 0000000..30a2881 --- /dev/null +++ b/Aggregator/Parser/Download.cs @@ -0,0 +1,11 @@ +using System.Net; + +namespace Parser { + public static class Download { + public static string DownloadXML(string site) { + using (var client = new WebClient()) { + return client.DownloadString(site); + } + } + } +} -- cgit v1.2.3-13-gbd6f