diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-04 07:28:06 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-04 07:28:06 +0000 |
commit | 2b12d807dece9caaa77377f08300836e9de1260b (patch) | |
tree | b1f161bed2a83b5d182e7b9129895548f3802eb6 | |
parent | be5de380b53ff8d5a7758f816610f5fefc58ad72 (diff) | |
download | newsaggregator-2b12d807dece9caaa77377f08300836e9de1260b.tar.gz newsaggregator-2b12d807dece9caaa77377f08300836e9de1260b.tar.bz2 newsaggregator-2b12d807dece9caaa77377f08300836e9de1260b.zip |
Making a test app for bbc aggregation
-rw-r--r-- | Aggregator/Main/Program.cs | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/Aggregator/Main/Program.cs b/Aggregator/Main/Program.cs index a9c5ed6..80fd62a 100644 --- a/Aggregator/Main/Program.cs +++ b/Aggregator/Main/Program.cs @@ -1,12 +1,28 @@ using System;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Aggregator.Classes;
+using Aggregator.Parser;
-namespace Main
-{
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
+namespace Main {
+ internal static class Program {
+ private static async Task Main(string[] args) {
+ List<Config> configs = new List<Config>() {
+ new Config() {
+ Source = "BBC",
+ Title = 0,
+ Description = 1,
+ ArticleLink = 2,
+ ImageLink = 5,
+ PublishDate = 4
+ }
+ };
+ string[] xmls = new [] {
+ await Download.DownloadXML("http://feeds.bbci.co.uk/news/rss.xml")
+ };
+ List<Article> articles = ParserService.ParseMultiple(xmls, configs).ToList();
+ Console.WriteLine(articles.Count);
}
}
}
|