private void FetchNewFeeds() { // Get all the items from the database List <Item> currentItems = BasicRepository.AllItems(); IList <Feed> feeds = BasicRepository.AllFeeds(); FeedFetcher fetcher = new FeedFetcher(_settings, currentItems); // Fetch each one List <Item> newItems = new List <Item>(); foreach (Feed feed in feeds) { newItems.AddRange(fetcher.Parse(feed)); Console.WriteLine("Finished {0}", feed.Url); } if (newItems.Count > 0) { SaveToDatabase(newItems); } }
private void FetchNewFeeds() { // Get all the items from the database List<Item> currentItems = BasicRepository.AllItems(); IList<Feed> feeds = BasicRepository.AllFeeds(); FeedFetcher fetcher = new FeedFetcher(_settings, currentItems); // Fetch each one List<Item> newItems = new List<Item>(); foreach (Feed feed in feeds) { newItems.AddRange(fetcher.Parse(feed)); Console.WriteLine("Finished {0}", feed.Url); } if (newItems.Count > 0) { SaveToDatabase(newItems); } }