aboutsummaryrefslogtreecommitdiff
path: root/Aggregator/Parser/Download.cs
blob: c90dc0a22d317eb1d77902fdac38e662a8b0a890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System.Net;
using System.Threading.Tasks;

namespace Parser {
    public static class Download {
        public static string DownloadXMLSync(string site) {
            using (var client = new WebClient()) {
                return client.DownloadString(site);
            }
        }

        public static Task<string> DownloadXML(string site) {
            using (var client = new WebClient()) {
                return client.DownloadStringTaskAsync(site);
            }
        }
    }
}