Class SelectionCandidate
- Namespace
- ZeroInstall.Model.Selection
- Assembly
- ZeroInstall.Model.dll
Represents an Implementation that is available to a solver for selection.
public sealed class SelectionCandidate : IEquatable<SelectionCandidate>
- Inheritance
-
SelectionCandidate
- Implements
- Inherited Members
Constructors
SelectionCandidate(FeedUri, FeedPreferences, Implementation, Requirements, bool)
Creates a new selection candidate.
public SelectionCandidate(FeedUri feedUri, FeedPreferences feedPreferences, Implementation implementation, Requirements requirements, bool offlineUncached = false)
Parameters
feedUri
FeedUriThe file name or URL of the feed listing the implementation.
feedPreferences
FeedPreferencesThe FeedPreferences for FeedUri.
implementation
ImplementationThe implementation this selection candidate references.
requirements
RequirementsA set of requirements/restrictions the
implementation
needs to fulfill for IsSuitable to betrue
.offlineUncached
boolMark this candidate as unsuitable because it is uncached and the network mode is set to offline.
Properties
Architecture
For platform-specific binaries, the platform for which an Implementation was compiled, in the form os-cpu. Either the os or cpu part may be *, which will make it available on any OS or CPU.
public string Architecture { get; }
Property Value
EffectiveStability
The UserStability if it is set, otherwise Stability.
[Browsable(false)]
public Stability EffectiveStability { get; }
Property Value
FeedPreferences
The FeedPreferences for FeedUri.
[Browsable(false)]
public FeedPreferences FeedPreferences { get; }
Property Value
FeedUri
The file name or URL of the feed listing the implementation.
public FeedUri FeedUri { get; }
Property Value
Implementation
The implementation this selection candidate references.
[Browsable(false)]
public Implementation Implementation { get; }
Property Value
IsSuitable
Indicates whether this implementation fulfills all specified Requirements.
[Browsable(false)]
public bool IsSuitable { get; }
Property Value
Notes
Human-readable notes about the implementation, e.g. "not suitable for this architecture".
public string? Notes { get; }
Property Value
Released
The date this implementation was made available. For development versions checked out from version control this attribute should not be present.
public DateTime Released { get; }
Property Value
Stability
The feed-specified stability rating for this implementation.
public Stability Stability { get; }
Property Value
UserStability
A user-specified override for the Stability specified in the feed.
public Stability UserStability { get; set; }
Property Value
Version
The version number of the implementation.
public ImplementationVersion Version { get; }
Property Value
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
Equals(SelectionCandidate?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(SelectionCandidate? other)
Parameters
other
SelectionCandidateAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns the selection candidate in the form "SelectionCandidate: Implementation". Not safe for parsing!
public override string ToString()