Table of Contents

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 Config

User settings controlling network behaviour, solving, etc.

feedManager IFeedManager

Provides access to remote and local Feeds. Handles downloading, signature verification and caching.

implementationStore IImplementationStore

Used to check which Implementations are already cached.

packageManager IPackageManager

An 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

IReadOnlyDictionary<FeedUri, Exception>

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

IReadOnlyList<SelectionCandidate>

LookupOriginalImplementation(ImplementationSelection)

Retrieves the original Implementation an ImplementationSelection was based ofF.

public Implementation LookupOriginalImplementation(ImplementationSelection implementationSelection)

Parameters

implementationSelection ImplementationSelection

Returns

Implementation

Exceptions

KeyNotFoundException

The implementationSelection was not provided by GetSortedCandidates(Requirements).