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
stabilityPolicyStabilityImplementations at this stability level or higher are preferred. Lower levels are used only if there is no other choice.
networkUseNetworkLevelControls how liberally network access is attempted.
languagesLanguageSetThe preferred languages for the implementation.
isCachedPredicate<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
xSelectionCandidateThe first object to compare.
ySelectionCandidateThe second object to compare.
Returns
- int
A signed integer that indicates the relative values of
xandy, as shown in the following table.Value Meaning Less than zero xis less thany.Zero xequalsy.Greater than zero xis greater thany.