aboutsummaryrefslogtreecommitdiff
path: root/Aggregator/Parser
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-02 13:42:52 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-02 13:42:52 +0000
commit496396683c6fa15f2daf3c27567cbd26b7941e7c (patch)
tree1f255fda65a0abcb62ed0add752b7b02fd2f2456 /Aggregator/Parser
parent74d62003b3d4e4c4cb763fb4948852d8c1f13b82 (diff)
downloadnewsaggregator-496396683c6fa15f2daf3c27567cbd26b7941e7c.tar.gz
newsaggregator-496396683c6fa15f2daf3c27567cbd26b7941e7c.tar.bz2
newsaggregator-496396683c6fa15f2daf3c27567cbd26b7941e7c.zip
Made a static class to handle downloads
Diffstat (limited to 'Aggregator/Parser')
-rw-r--r--Aggregator/Parser/Class1.cs6
-rw-r--r--Aggregator/Parser/Download.cs11
2 files changed, 11 insertions, 6 deletions
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);
+ }
+ }
+ }
+}