Class ImplementationSelection
An executable implementation of a Feed as a part of a Selections.
Inheritance
Implements
Inherited Members
Namespace: ZeroInstall.Model.Selection
Assembly: ZeroInstall.Model.dll
Syntax
public sealed class ImplementationSelection : ImplementationBase, IDependencyContainer, IInterfaceUriBindingContainer, IInterfaceUri, IBindingContainer
Remarks
This class does not contain information on how to download the implementation in case it is not in cache. That must be obtained from a Implementation instance.
Constructors
ImplementationSelection()
Used for XML serialization.
Declaration
public ImplementationSelection()
ImplementationSelection(IReadOnlyList<SelectionCandidate>)
Creates a new implementation selection.
Declaration
public ImplementationSelection(IReadOnlyList<SelectionCandidate> candidates)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<SelectionCandidate> | candidates | All candidates that were considered for selection (including the selected one). These are used to present the user with possible alternatives. |
Properties
Candidates
All Implementations that were considered by the solver when this one was chosen.
null
when selections are loaded from a file.
Declaration
public IReadOnlyList<SelectionCandidate> Candidates { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<SelectionCandidate> |
Distribution
The name of the distribution (e.g. Debian, RPM) where this implementation comes from, if any.
Declaration
public string Distribution { get; }
Property Value
Type | Description |
---|---|
String |
FromFeed
The URL or local path of the feed that contains this implementation.
FromDistributionPrefix is prepended if data is pulled from a native package manager.
If null
or Empty use InterfaceUri instead.
Declaration
public FeedUri FromFeed { get; set; }
Property Value
Type | Description |
---|---|
FeedUri |
FromFeedString
Used for XML serialization.
Declaration
public string FromFeedString { get; set; }
Property Value
Type | Description |
---|---|
String |
See Also
InterfaceUri
The URI or local path of the interface this implementation is for.
Declaration
public FeedUri InterfaceUri { get; set; }
Property Value
Type | Description |
---|---|
FeedUri |
InterfaceUriString
Used for XML serialization.
Declaration
public string InterfaceUriString { get; set; }
Property Value
Type | Description |
---|---|
String |
See Also
QuickTestFile
A file which, if present, indicates that the selection is still valid. This is sometimes used with distribution-provided selections. If not present and the ID starts with "package:", you'll need to query the distribution's package manager to check that this version is still installed.
Declaration
public string QuickTestFile { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
Clone()
Creates a deep copy of this ImplementationSelection instance.
Declaration
public override Element Clone()
Returns
Type | Description |
---|---|
Element | The new copy of the ImplementationSelection. |
Overrides
CompareTo(ImplementationSelection)
Declaration
public int CompareTo(ImplementationSelection other)
Parameters
Type | Name | Description |
---|---|---|
ImplementationSelection | other |
Returns
Type | Description |
---|---|
Int32 |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(ImplementationSelection)
Declaration
public bool Equals(ImplementationSelection other)
Parameters
Type | Name | Description |
---|---|---|
ImplementationSelection | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Normalize(FeedUri)
Flattens inheritance structures, Converts legacy elements, sets default values, etc..
Declaration
public override void Normalize(FeedUri feedUri = null)
Parameters
Type | Name | Description |
---|---|---|
FeedUri | feedUri | The feed the data was originally loaded from. |
Overrides
Exceptions
Type | Condition |
---|---|
InvalidDataException | A required property is not set or invalid. |
ToString()
Returns the implementation in the form "Comma-separated list of set values". Not safe for parsing!
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
Equality(ImplementationSelection, ImplementationSelection)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(ImplementationSelection left, ImplementationSelection right)
Parameters
Type | Name | Description |
---|---|---|
ImplementationSelection | left | The left object |
ImplementationSelection | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(ImplementationSelection, ImplementationSelection)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(ImplementationSelection left, ImplementationSelection right)
Parameters
Type | Name | Description |
---|---|---|
ImplementationSelection | left | The left object |
ImplementationSelection | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |