C# Class ZeroInstall.Services.Solvers.BacktrackingSolver.Pass

Holds state during a single pass of the BacktrackingSolver.
显示文件 Open project: 0install/0install-win

Private Properties

Property Type Description
AddToSelections ImplementationSelection
ConflictsWithExistingRestrictions bool
ConflictsWithExistingSelections bool
FilterSuitableCandidates IEnumerable
RemoveLastFromSelections void
TryToSelectCandidate bool
TryToSolve bool
TryToSolveBindingRequirements bool
TryToSolveCommand bool
TryToSolveDependencies bool
TryToSolveDependency bool
TryToUseExistingCandidate bool

Public Methods

Method Description
Pass ( [ requirements, CancellationToken cancellationToken, [ candidateProvider ) : System

Creates a new backtracking solver run.

TryToSolve ( ) : bool

Try to satisfy the _topLevelRequirements. If successful the result can be retrieved from Selections.

Private Methods

Method Description
AddToSelections ( [ candidate, [ requirements, [ allCandidates ) : ImplementationSelection
ConflictsWithExistingRestrictions ( [ candidate, [ interfaceUri ) : bool
ConflictsWithExistingSelections ( [ candidate ) : bool
FilterSuitableCandidates ( [ candidates, [ interfaceUri ) : IEnumerable
RemoveLastFromSelections ( ) : void
TryToSelectCandidate ( [ candidates, [ requirements, [ allCandidates ) : bool
TryToSolve ( [ requirements ) : bool

Try to satisfy a set of requirements, respecting any existing Selections.

TryToSolveBindingRequirements ( [ selection ) : bool
TryToSolveCommand ( [ command, [ requirements ) : bool
TryToSolveDependencies ( [ dependencyContainer ) : bool
TryToSolveDependency ( [ dependency ) : bool
TryToUseExistingCandidate ( [ requirements, [ suitableCandidates, [ selection ) : bool

Method Details

Pass() public method

Creates a new backtracking solver run.
public Pass ( [ requirements, CancellationToken cancellationToken, [ candidateProvider ) : System
requirements [ The top-level requirements the solver should try to meet.
cancellationToken NanoByte.Common.Tasks.CancellationToken Used to signal when the user wishes to cancel the solver run.
candidateProvider [ Generates s for the solver to choose among.
return System

TryToSolve() public method

Try to satisfy the _topLevelRequirements. If successful the result can be retrieved from Selections.
public TryToSolve ( ) : bool
return bool