Exemplo n.º 1
0
        public void Merge(FeedManager newFeedManager)
        {
            ItemLifetime  = newFeedManager.ItemLifetime;
            MaxItemsLimit = newFeedManager.MaxItemsLimit;

            ListMerger.Merge(newFeedManager.Feeds, Feeds, FeedEqualityComparer.Default);

            foreach (var feed in Feeds)
            {
                var newFeed = newFeedManager.Feeds.Single(x => x.Uri == feed.Uri);
                feed.UpdateItems(newFeed.Items, cloneItemsBeforeInsert: true);
            }
        }
Exemplo n.º 2
0
        public void Merge(FeedManager secondFeedManager)
        {
            // TODO: secondFeedManager wins; improve Merge so that local offline changes are not lost.
            ItemLifetime  = secondFeedManager.ItemLifetime;
            MaxItemsLimit = secondFeedManager.MaxItemsLimit;

            foreach (var feed in Feeds.ToArray())
            {
                Feeds.Remove(feed);
            }
            foreach (var feed in secondFeedManager.Feeds)
            {
                Feeds.Add(feed);
            }
        }