Example #1
0
        /// <summary>
        /// Onloads the specified RSS feed list.
        /// </summary>
        /// <param name="rssFeedList">The RSS feed list.</param>
        /// <param name="savedArticlesList">The saved articles list.</param>
        public void Onload(ObservableCollection <RssFeed> rssFeedList, ObservableCollection <SavedArticle> savedArticlesList)
        {
            if (_saveUtility.LoadFromFile() != null)
            {
                foreach (string uri in _saveUtility.LoadFromFile())
                {
                    SyndicationFeed feed = LoadFeedFromUrl(uri);

                    if (feed != null)
                    {
                        _feedManager.AddFeed(rssFeedList, new RssFeed()
                        {
                            Feed = feed, RssUrl = uri
                        });
                    }
                }
            }

            if (_saveUtility.LoadArticlesFromFile() != null)
            {
                foreach (SavedArticle article in _saveUtility.LoadArticlesFromFile())
                {
                    savedArticlesList.Add(article);
                }
            }
        }