Class ImplementationDiscoveryExtensions
- Namespace
- ZeroInstall.Services.Fetchers
- Assembly
- ZeroInstall.Services.dll
Provides extension methods for IImplementationDiscovery.
public static class ImplementationDiscoveryExtensions
- Inheritance
-
ImplementationDiscoveryExtensions
- Inherited Members
Methods
TryGetImplementation(IImplementationDiscovery, ManifestDigest, TimeSpan, CancellationToken)
Tries to find a specific implementation in an implementation store on another machine within the specified timeout
.
public static Uri? TryGetImplementation(this IImplementationDiscovery discovery, ManifestDigest manifestDigest, TimeSpan timeout, CancellationToken cancellationToken = default)
Parameters
discovery
IImplementationDiscoveryThe implementation discovery service.
manifestDigest
ManifestDigestThe digest the implementation to find.
timeout
TimeSpanThe amount of time to look for the implementation.
cancellationToken
CancellationTokenUsed to stop looking for the implementation.
Returns
- Uri
An archive URI from which the implementation can be downloaded;
null
if the implementation was not found within the specifiedtimeout
.
Exceptions
- OperationCanceledException
The
cancellationToken
was cancelled.