Zero Install .NET API 2.20.0
ZeroInstall.Services.Feeds.FeedManagerExtensions Class Reference

Provides extension methods for IFeedManager. More...

Static Public Member Functions

static Feed GetFresh (this IFeedManager feedManager, FeedUri feedUri)
 Returns a specific Feed. Automatically updates cached feeds when indicated by IFeedManager.ShouldRefresh. More...
 
static IDisposable PauseRefresh (this IFeedManager feedManager)
 Temporarily sets IFeedManager.Refresh to false. More...
 

Detailed Description

Provides extension methods for IFeedManager.

Member Function Documentation

◆ GetFresh()

static Feed ZeroInstall.Services.Feeds.FeedManagerExtensions.GetFresh ( this IFeedManager  feedManager,
FeedUri  feedUri 
)
inlinestatic

Returns a specific Feed. Automatically updates cached feeds when indicated by IFeedManager.ShouldRefresh.

Parameters
feedManagerThe IFeedManager implementation.
feedUriThe canonical ID used to identify the feed.
Returns
The parsed Feed object.

Feeds are always served from the IFeedCache if possible, unless IFeedManager.Refresh is set to true.

Exceptions
UriFormatExceptionFeed.Uri is missing or does not match feedUri .
OperationCanceledExceptionThe user canceled the task.
IOExceptionA problem occurred while reading the feed file.
WebExceptionA problem occurred while fetching the feed file.
UnauthorizedAccessExceptionAccess to the cache is not permitted.
SignatureExceptionThe signature data of a remote feed file could not be verified.
InvalidDataExceptionA required property on the feed is not set or invalid.

◆ PauseRefresh()

static IDisposable ZeroInstall.Services.Feeds.FeedManagerExtensions.PauseRefresh ( this IFeedManager  feedManager)
inlinestatic

Temporarily sets IFeedManager.Refresh to false.

Returns
Call IDisposable.Dispose on this to restore the original value of IFeedManager.Refresh.

The documentation for this class was generated from the following file: