Class FallbackSolver
- Namespace
- ZeroInstall.Services.Solvers
- Assembly
- ZeroInstall.Services.dll
Wraps two solvers always passing requests to the primary one initially and falling back to secondary one should the primary one fail.
public sealed class FallbackSolver : ISolver
- Inheritance
-
FallbackSolver
- Implements
- Inherited Members
- Extension Methods
Remarks
This class is immutable and thread-safe.
Constructors
FallbackSolver(ISolver, ISolver)
Wraps two solvers always passing requests to the primary one initially and falling back to secondary one should the primary one fail.
public FallbackSolver(ISolver primarySolver, ISolver secondarySolver)
Parameters
primarySolverISolverThe solver to run initially.
secondarySolverISolverhe solver to fall back to should
primarySolverfail.
Remarks
This class is immutable and thread-safe.
Methods
Solve(Requirements)
Provides Selections that satisfy a set of Requirements.
public Selections Solve(Requirements requirements)
Parameters
requirementsRequirementsThe requirements to satisfy.
Returns
- Selections
The selected ImplementationSelections.
Remarks
Feed files may be downloaded, signature validation is performed, implementations are not downloaded.
Exceptions
- OperationCanceledException
The user canceled the task.
- ArgumentException
requirementsis incomplete.- IOException
A problem occurred while reading the feed file.
- WebException
A problem occurred while fetching the feed file.
- UnauthorizedAccessException
Access to the cache is not permitted.
- SignatureException
The signature data of a remote feed file could not be verified.
- SolverException
The solver was unable to provide Selections that fulfill the
requirements.