Class ServiceProvider
- Namespace
- ZeroInstall.Services
- Assembly
- ZeroInstall.Services.dll
Instantiates requested services transparently on first use. Handles dependency injection internally. Use exactly one instance of the service provider per user request to ensure consistent state during execution.
public class ServiceProvider
- Inheritance
-
ServiceProvider
- Derived
- Inherited Members
Remarks
This class is thread-safe.
Constructors
ServiceProvider(ITaskHandler)
Creates a new service provider.
public ServiceProvider(ITaskHandler handler)
Parameters
handler
ITaskHandlerA callback object used when the user needs to be asked questions or informed about download and IO tasks.
Exceptions
- IOException
There was a problem accessing a configuration file or one of the implementation stores.
- UnauthorizedAccessException
Access to a configuration file or one of the implementation stores was not permitted.
Properties
CatalogManager
Provides access to remote and local Catalogs. Handles downloading, signature verification and caching.
public virtual ICatalogManager CatalogManager { get; }
Property Value
Config
User settings controlling network behaviour, solving, etc.
public virtual Config Config { get; }
Property Value
Executor
Executes a Selections document as a program using dependency injection.
public virtual IExecutor Executor { get; }
Property Value
FeedCache
Provides access to a cache of Feeds that were downloaded via HTTP(S).
public virtual IFeedCache FeedCache { get; }
Property Value
FeedManager
Allows configuration of the source used to request Feeds.
public virtual IFeedManager FeedManager { get; }
Property Value
Fetcher
Used to download missing Implementations.
public virtual IFetcher Fetcher { get; }
Property Value
Handler
A callback object used when the user needs to be asked questions or informed about download and IO tasks.
public ITaskHandler Handler { get; }
Property Value
ImplementationStore
Describes an object that allows the storage and retrieval of Implementation directories.
public IImplementationStore ImplementationStore { get; set; }
Property Value
OpenPgp
Provides access to an encryption/signature system compatible with the OpenPGP standard.
public virtual IOpenPgp OpenPgp { get; set; }
Property Value
PackageManager
An external package manager that can install PackageImplementations.
public virtual IPackageManager PackageManager { get; }
Property Value
SelectionCandidateProvider
Generates SelectionCandidates for the Solver to choose among.
public virtual ISelectionCandidateProvider SelectionCandidateProvider { get; }
Property Value
SelectionsManager
Provides methods for filtering Selections.
public virtual ISelectionsManager SelectionsManager { get; }
Property Value
Solver
Chooses a set of Implementations to satisfy the requirements of a program and its user.
public virtual ISolver Solver { get; }
Property Value
TrustManager
Methods for verifying signatures and user trust.
public virtual ITrustManager TrustManager { get; }
Property Value
Methods
TrySolveOffline(Requirements)
Tries to provide Selections that satisfy a set of Requirements without downloading any files.
public Selections? TrySolveOffline(Requirements requirements)
Parameters
requirements
RequirementsThe requirements to satisfy.
Returns
- Selections
The selected ImplementationSelections or
null
if no solution was found.
Exceptions
- OperationCanceledException
The user canceled the task.
- ArgumentException
requirements
is incomplete.