Table of Contents

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
object
SolverDemand
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

Requirements Requirements

The requirements.

CandidateProvider ISelectionCandidateProvider

Generates SelectionCandidates for the Requirements.

Importance Importance

Describes 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

ISelectionCandidateProvider

Candidates

All candidates for the Requirements, including those that are not suitable.

public IReadOnlyList<SelectionCandidate> Candidates { get; }

Property Value

IReadOnlyList<SelectionCandidate>

Importance

Describes how important the demand is (i.e. whether ignoring it is an option).

public Importance Importance { get; init; }

Property Value

Importance

Requirements

The requirements.

public Requirements Requirements { get; init; }

Property Value

Requirements

Methods

CandidatesCompatibleWith(Selections)

Gets all SelectionCandidates that are compatible with the specified selections.

public IEnumerable<SelectionCandidate> CandidatesCompatibleWith(Selections selections)

Parameters

selections Selections

Returns

IEnumerable<SelectionCandidate>

Deconstruct(out Requirements, out ISelectionCandidateProvider, out Importance)

public void Deconstruct(out Requirements Requirements, out ISelectionCandidateProvider CandidateProvider, out Importance Importance)

Parameters

Requirements Requirements
CandidateProvider ISelectionCandidateProvider
Importance Importance

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(SolverDemand?)

public bool Equals(SolverDemand? other)

Parameters

other SolverDemand

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(SolverDemand?, SolverDemand?)

public static bool operator ==(SolverDemand? left, SolverDemand? right)

Parameters

left SolverDemand
right SolverDemand

Returns

bool

operator !=(SolverDemand?, SolverDemand?)

public static bool operator !=(SolverDemand? left, SolverDemand? right)

Parameters

left SolverDemand
right SolverDemand

Returns

bool