Class SolverDemand
- Namespace
- ZeroInstall.Services.Solvers
- Assembly
- ZeroInstall.Services.dll
A demand used by ISolvers internally. Wrapper for Requirements that holds SelectionCandidates.
public sealed record SolverDemand : IEquatable<SolverDemand>
- Inheritance
-
objectSolverDemand
- Implements
Constructors
SolverDemand(Requirements, ISelectionCandidateProvider, Importance)
A demand used by ISolvers internally. Wrapper for Requirements that holds SelectionCandidates.
public SolverDemand(Requirements Requirements, ISelectionCandidateProvider CandidateProvider, Importance Importance = Importance.Essential)
Parameters
RequirementsRequirementsThe requirements.
CandidateProviderISelectionCandidateProviderGenerates SelectionCandidates for the
Requirements.ImportanceImportanceDescribes how important the demand is (i.e. whether ignoring it is an option).
Properties
CandidateProvider
Generates SelectionCandidates for the Requirements.
public ISelectionCandidateProvider CandidateProvider { get; init; }
Property Value
Candidates
All candidates for the Requirements, including those that are not suitable.
public IReadOnlyList<SelectionCandidate> Candidates { get; }
Property Value
Importance
Describes how important the demand is (i.e. whether ignoring it is an option).
public Importance Importance { get; init; }
Property Value
Requirements
The requirements.
public Requirements Requirements { get; init; }
Property Value
Methods
CandidatesCompatibleWith(Selections)
Gets all SelectionCandidates that are compatible with the specified selections.
public IEnumerable<SelectionCandidate> CandidatesCompatibleWith(Selections selections)
Parameters
selectionsSelections
Returns
Deconstruct(out Requirements, out ISelectionCandidateProvider, out Importance)
public void Deconstruct(out Requirements Requirements, out ISelectionCandidateProvider CandidateProvider, out Importance Importance)
Parameters
RequirementsRequirementsCandidateProviderISelectionCandidateProviderImportanceImportance
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(SolverDemand?)
public bool Equals(SolverDemand? other)
Parameters
otherSolverDemand
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(SolverDemand?, SolverDemand?)
public static bool operator ==(SolverDemand? left, SolverDemand? right)
Parameters
leftSolverDemandrightSolverDemand
Returns
operator !=(SolverDemand?, SolverDemand?)
public static bool operator !=(SolverDemand? left, SolverDemand? right)
Parameters
leftSolverDemandrightSolverDemand