Table of Contents

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 FeedUri

The file name or URL of the feed listing the implementation.

feedPreferences FeedPreferences

The FeedPreferences for FeedUri.

implementation Implementation

The implementation this selection candidate references.

requirements Requirements

A set of requirements/restrictions the implementation needs to fulfill for IsSuitable to be true.

offlineUncached bool

Mark 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

string

EffectiveStability

The UserStability if it is set, otherwise Stability.

[Browsable(false)]
public Stability EffectiveStability { get; }

Property Value

Stability

FeedPreferences

[Browsable(false)]
public FeedPreferences FeedPreferences { get; }

Property Value

FeedPreferences

FeedUri

The file name or URL of the feed listing the implementation.

public FeedUri FeedUri { get; }

Property Value

FeedUri

Implementation

The implementation this selection candidate references.

[Browsable(false)]
public Implementation Implementation { get; }

Property Value

Implementation

IsSuitable

Indicates whether this implementation fulfills all specified Requirements.

[Browsable(false)]
public bool IsSuitable { get; }

Property Value

bool

Notes

Human-readable notes about the implementation, e.g. "not suitable for this architecture".

public string? Notes { get; }

Property Value

string

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

DateTime

Stability

The feed-specified stability rating for this implementation.

public Stability Stability { get; }

Property Value

Stability

UserStability

A user-specified override for the Stability specified in the feed.

public Stability UserStability { get; set; }

Property Value

Stability

Version

The version number of the implementation.

public ImplementationVersion Version { get; }

Property Value

ImplementationVersion

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(SelectionCandidate?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(SelectionCandidate? other)

Parameters

other SelectionCandidate

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

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()

Returns

string