Table of Contents

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 ITaskHandler

A 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

ICatalogManager

Config

User settings controlling network behaviour, solving, etc.

public virtual Config Config { get; }

Property Value

Config

Executor

Executes a Selections document as a program using dependency injection.

public virtual IExecutor Executor { get; }

Property Value

IExecutor

FeedCache

Provides access to a cache of Feeds that were downloaded via HTTP(S).

public virtual IFeedCache FeedCache { get; }

Property Value

IFeedCache

FeedManager

Allows configuration of the source used to request Feeds.

public virtual IFeedManager FeedManager { get; }

Property Value

IFeedManager

Fetcher

Used to download missing Implementations.

public virtual IFetcher Fetcher { get; }

Property Value

IFetcher

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

ITaskHandler

ImplementationStore

Describes an object that allows the storage and retrieval of Implementation directories.

public IImplementationStore ImplementationStore { get; set; }

Property Value

IImplementationStore

OpenPgp

Provides access to an encryption/signature system compatible with the OpenPGP standard.

public virtual IOpenPgp OpenPgp { get; set; }

Property Value

IOpenPgp

PackageManager

An external package manager that can install PackageImplementations.

public virtual IPackageManager PackageManager { get; }

Property Value

IPackageManager

SelectionCandidateProvider

Generates SelectionCandidates for the Solver to choose among.

public virtual ISelectionCandidateProvider SelectionCandidateProvider { get; }

Property Value

ISelectionCandidateProvider

SelectionsManager

Provides methods for filtering Selections.

public virtual ISelectionsManager SelectionsManager { get; }

Property Value

ISelectionsManager

Solver

Chooses a set of Implementations to satisfy the requirements of a program and its user.

public virtual ISolver Solver { get; }

Property Value

ISolver

TrustManager

Methods for verifying signatures and user trust.

public virtual ITrustManager TrustManager { get; }

Property Value

ITrustManager

Methods

TrySolveOffline(Requirements)

Tries to provide Selections that satisfy a set of Requirements without downloading any files.

public Selections? TrySolveOffline(Requirements requirements)

Parameters

requirements Requirements

The 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.