Beispiel #1
0
    // PersistFeedSubscriptions - Store the list of opened feeds to the database
    //
    public void PersistFeedSubscriptions()
    {
        // Traverse the list of subscriptions and archive(save) these to
        // the database
        try
        {
            foreach (RSSFeed feed in feeds)
            {
                // Clear existing data by deleting the Feed and letting the cascade delete
                // function within the database, delete its dependant items
                if (feed.ID != 0)
                {
                    ClearFeedFromDatabase(feed);
                }

                // Load the feed items from the Internet
                InitialiseCurrentChannel(feed.feedURL);

                // Write the feed
                feedEntity.WriteSingleFeed(feed);
            }
        }
        catch
        {
            // Ignore errors, it simply means the database will not be up to date
        }
    }