Class SelectionCandidateComparer
- Namespace
- ZeroInstall.Services.Solvers
- Assembly
- ZeroInstall.Services.dll
Ranks SelectionCandidates.
public sealed class SelectionCandidateComparer : IComparer<SelectionCandidate>
- Inheritance
-
SelectionCandidateComparer
- Implements
- Inherited Members
Constructors
SelectionCandidateComparer(Stability, NetworkLevel, LanguageSet, Predicate<Implementation>)
Ranks SelectionCandidates.
public SelectionCandidateComparer(Stability stabilityPolicy, NetworkLevel networkUse, LanguageSet languages, Predicate<Implementation> isCached)
Parameters
stabilityPolicy
StabilityImplementations at this stability level or higher are preferred. Lower levels are used only if there is no other choice.
networkUse
NetworkLevelControls how liberally network access is attempted.
languages
LanguageSetThe preferred languages for the implementation.
isCached
Predicate<Implementation>sed to determine which implementations are already cached in the IImplementationStore.
Methods
Compare(SelectionCandidate?, SelectionCandidate?)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(SelectionCandidate? x, SelectionCandidate? y)
Parameters
x
SelectionCandidateThe first object to compare.
y
SelectionCandidateThe second object to compare.
Returns
- int
A signed integer that indicates the relative values of
x
andy
, as shown in the following table.Value Meaning Less than zero x
is less thany
.Zero x
equalsy
.Greater than zero x
is greater thany
.