Class SelectionCandidateProvider
- Namespace
- ZeroInstall.Services.Solvers
- Assembly
- ZeroInstall.Services.dll
Generates SelectionCandidates for ISolvers to choose among.
public class SelectionCandidateProvider : ISelectionCandidateProvider
- Inheritance
-
SelectionCandidateProvider
- Implements
- Inherited Members
Remarks
This class performs in-memory caching of InterfacePreferencess and implementations and is thread-safe.
Constructors
SelectionCandidateProvider(Config, IFeedManager, IImplementationStore, IPackageManager)
Creates a new SelectionCandidate provider.
public SelectionCandidateProvider(Config config, IFeedManager feedManager, IImplementationStore implementationStore, IPackageManager packageManager)
Parameters
config
ConfigUser settings controlling network behaviour, solving, etc.
feedManager
IFeedManagerProvides access to remote and local Feeds. Handles downloading, signature verification and caching.
implementationStore
IImplementationStoreUsed to check which Implementations are already cached.
packageManager
IPackageManagerAn external package manager that can install PackageImplementations.
Properties
FailedFeeds
A list of feeds that could not be downloaded along with the exceptions describing the problems.
public IReadOnlyDictionary<FeedUri, Exception> FailedFeeds { get; }
Property Value
Methods
Clear()
Clears any in-memory caches.
public void Clear()
GetSortedCandidates(Requirements)
Gets all SelectionCandidates for a specific set of Requirements sorted from best to worst.
public IReadOnlyList<SelectionCandidate> GetSortedCandidates(Requirements requirements)
Parameters
requirements
Requirements
Returns
LookupOriginalImplementation(ImplementationSelection)
Retrieves the original Implementation an ImplementationSelection was based ofF.
public Implementation LookupOriginalImplementation(ImplementationSelection implementationSelection)
Parameters
implementationSelection
ImplementationSelection
Returns
Exceptions
- KeyNotFoundException
The
implementationSelection
was not provided by GetSortedCandidates(Requirements).