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
configConfigUser settings controlling network behaviour, solving, etc.
feedManagerIFeedManagerProvides access to remote and local Feeds. Handles downloading, signature verification and caching.
implementationStoreIImplementationStoreUsed to check which Implementations are already cached.
packageManagerIPackageManagerAn 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
requirementsRequirements
Returns
LookupOriginalImplementation(ImplementationSelection)
Retrieves the original Implementation an ImplementationSelection was based ofF.
public Implementation LookupOriginalImplementation(ImplementationSelection implementationSelection)
Parameters
implementationSelectionImplementationSelection
Returns
Exceptions
- KeyNotFoundException
The
implementationSelectionwas not provided by GetSortedCandidates(Requirements).