Class FeedManagerExtensions
- Namespace
- ZeroInstall.Services.Feeds
- Assembly
- ZeroInstall.Services.dll
Provides extension methods for IFeedManager.
public static class FeedManagerExtensions
- Inheritance
-
FeedManagerExtensions
- Inherited Members
Methods
GetFresh(IFeedManager, FeedUri)
Returns a specific Feed. Automatically updates cached feeds when indicated by ShouldRefresh.
public static Feed GetFresh(this IFeedManager feedManager, FeedUri feedUri)
Parameters
feedManager
IFeedManagerThe IFeedManager implementation.
feedUri
FeedUriThe canonical ID used to identify the feed.
Returns
Remarks
Feeds are always served from the IFeedCache if possible, unless Refresh is set to true
.
Exceptions
- UriFormatException
Uri is missing or does not match
feedUri
.- OperationCanceledException
The user canceled the task.
- IOException
A problem occurred while reading the feed file.
- WebException
A problem occurred while fetching the feed file.
- UnauthorizedAccessException
Access to the cache is not permitted.
- SignatureException
The signature data of a remote feed file could not be verified.
- InvalidDataException
A required property on the feed is not set or invalid.
ImportFeed(IFeedManager, string)
Imports a local copy of a remote Feed into the IFeedCache after verifying its signature.
public static void ImportFeed(this IFeedManager feedManager, string path)
Parameters
feedManager
IFeedManagerThe IFeedManager implementation.
path
stringThe path of a local copy of the feed.
Exceptions
- IOException
A problem occurred while reading the feed file.
- UnauthorizedAccessException
Access to the feed file or the cache is not permitted.
- InvalidDataException
A problem occurred while deserializing an XML file.
- SignatureException
The signature data of the feed file could not be handled or no signatures were trusted.