public async Task DownloadNews() { //2. download DownloadedNews downloadedDownloadedNews = await NewsGrabber.GetNews(); //3. if there fresh news - p if (downloadedDownloadedNews.Results.Count > Articles.Count) { foreach (var articleDownloaded in downloadedDownloadedNews.Results) { Article article = new Article( articleDownloaded.Date, articleDownloaded.Link, articleDownloaded.LinkText ); Add(article); } ArticlesSerializer.SaveMyData(Articles, _savedArticleFileName); } }
private void Add(Article article) { Articles.Add(article); }