Example #1
0
 /// <summary>
 /// Loads the feedlist from the feedlocation and use the input feedlist to bootstrap the settings. The input feedlist
 /// is also used as a fallback in case the FeedLocation is inaccessible (e.g. we are in offline mode and the feed location
 /// is on the Web).
 /// </summary>
 /// <param name="feedlist">The feed list to provide the settings for the feeds downloaded by this FeedSource</param>
 public override void BootstrapAndLoadFeedlist(feeds feedlist)
 {
     if (feedlist.feed.Count == 1)
     {
         this.feedsTable.Add(feedlist.feed[0].link, feedlist.feed[0]);
         feedlist.feed[0].owner = this;
     }
     else
     {
         throw new ApplicationException(ComponentsText.ExceptionFacebookFeedlistCorrupted);
     }
 }
Example #2
0
        /// <summary>
        /// Loads the feedlist from the FeedLocation.
        ///</summary>
        public override void LoadFeedlist()
        {
            feeds myFeeds = null;

            if (File.Exists(this.location.Location))
            {
                //load Bandit subscriptions.xml document into memory
                XmlReader     reader     = XmlReader.Create(this.location.Location);
                XmlSerializer serializer = XmlHelper.SerializerCache.GetSerializer(typeof(feeds));
                myFeeds = (feeds)serializer.Deserialize(reader);
                reader.Close();
            }
            else
            {
                myFeeds = new feeds();
                NewsFeed f = CreateDefaultFacebookNewsFeed();
                myFeeds.feed.Add(f);
            }

            //load news feed from Facebook using settings from subscriptions.xml
            this.BootstrapAndLoadFeedlist(myFeeds);
        }
Example #3
0
 /// <summary>
 /// Loads the feedlist from the feedlocation and use the input feedlist to bootstrap the settings. The input feedlist
 /// is also used as a fallback in case the FeedLocation is inaccessible (e.g. we are in offline mode and the feed location
 /// is on the Web).
 /// </summary>
 /// <param name="feedlist">The feed list to provide the settings for the feeds downloaded by this FeedSource</param>
 public override void BootstrapAndLoadFeedlist(feeds feedlist)
 {
     ImportFeedlist(feedlist, null, true, false);
 }