Exemplo n.º 1
0
        public void RemoveFeed(NamedUrl feed)
        {
            lock ( _feedLock ) {
                if (ReservedFeeds.Any(x => x.Name.Equals(feed.Name, StringComparison.InvariantCultureIgnoreCase)))
                {
                    return;
                }
                NamedUrl[] remList = UserFeeds.Where(x => !x.Name.Equals(feed.Name)).ToArray();
                WriteFeedListToDisk(remList);

                cachedFeedsExpireDate = DateTime.MinValue; // Expire cache
            }
        }
Exemplo n.º 2
0
        public void AddFeed(NamedUrl feed)
        {
            lock ( _feedLock ) {
                if (ReservedFeeds.Any(x => x.Name.Equals(feed.Name, StringComparison.InvariantCultureIgnoreCase)))
                {
                    return;
                }
                List <NamedUrl> newList = UserFeeds.Where(x => !x.Name.Equals(feed.Name))
                                          .ToList();

                newList.Add(feed);
                WriteFeedListToDisk(newList);

                cachedFeedsExpireDate = DateTime.MinValue; // Expire cache
            }
        }