Пример #1
0
        /// <inheritdoc/>
        public void Remove(FeedUri feedUri)
        {
            #region Sanity checks
            if (feedUri == null)
            {
                throw new ArgumentNullException("feedUri");
            }
            #endregion

            // Remove from memory cache
            string key = feedUri.Escape();
            lock (_feedDictionary)
                _feedDictionary.Remove(key);

            // Remove from underlying cache
            _backingCache.Remove(feedUri);
        }
Пример #2
0
 /// <summary>
 /// Deletes this <see cref="Feed"/> from the <see cref="IFeedCache"/> it is located in.
 /// </summary>
 /// <param name="handler">A callback object used when the the user needs to be asked questions or informed about IO tasks.</param>
 /// <exception cref="KeyNotFoundException">No matching feed could be found in the <see cref="IFeedCache"/>.</exception>
 /// <exception cref="IOException">The feed could not be deleted.</exception>
 /// <exception cref="UnauthorizedAccessException">Write access to the cache is not permitted.</exception>
 public override void Delete(ITaskHandler handler)
 {
     _cache.Remove(_feed.Uri);
 }