Show / Hide Table of Contents

Class ImplementationSelection

An executable implementation of a Feed as a part of a Selections.

Inheritance
Object
XmlUnknown
FeedElement
TargetBase
Element
ImplementationBase
ImplementationSelection
Implements
IEquatable<XmlUnknown>
IEquatable<FeedElement>
IEquatable<TargetBase>
IDependencyContainer
ICloneable<Element>
IEquatable<Element>
IEquatable<ImplementationBase>
IInterfaceUriBindingContainer
IInterfaceUri
IBindingContainer
ICloneable<ImplementationSelection>
IComparable<ImplementationSelection>
IEquatable<ImplementationSelection>
Inherited Members
ImplementationBase.CloneFromTo(ImplementationBase, ImplementationBase)
ImplementationBase.Equals(ImplementationBase)
ImplementationBase.ID
ImplementationBase.LocalPath
ImplementationBase.Version
ImplementationBase.ManifestDigest
Element.ReleaseDateFormat
Element.ReleasedVerbatim
Element.ContainsCommand(String)
Element.GetCommand(String)
Element.EnsureAttributes()
Element.CloneFromTo(Element, Element)
Element.Equals(Element)
Element.VersionString
Element.VersionModifier
Element.Released
Element.ReleasedString
Element.Stability
Element.RolloutPercentage
Element.License
Element.Main
Element.SelfTest
Element.DocDir
Element.Dependencies
Element.Restrictions
Element.Bindings
Element.Commands
Element.Item[String]
TargetBase.CloneFromTo(TargetBase, TargetBase)
TargetBase.Equals(TargetBase)
TargetBase.Languages
TargetBase.Architecture
TargetBase.LanguagesString
TargetBase.ArchitectureString
FeedElement.FilterMismatch<T>(T)
FeedElement.FilterMismatch(IRecipeStep)
FeedElement.Equals(FeedElement)
FeedElement.IfZeroInstallVersion
FeedElement.IfZeroInstallVersionString
XmlUnknown.UnknownAttributes
XmlUnknown.UnknownElements
XmlUnknown.EnsureAttribute(Object, String)
XmlUnknown.EnsureAttributeSafeID(String, String)
XmlUnknown.ToShortXml()
XmlUnknown.Equals(XmlUnknown)
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
FromFeed

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
InterfaceUri

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
Element.Clone()

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
ImplementationBase.Equals(Object)

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
ImplementationBase.GetHashCode()

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
ImplementationBase.Normalize(FeedUri)
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
ImplementationBase.ToString()

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.

Implements

System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
IDependencyContainer
ICloneable<T>
System.IEquatable<T>
System.IEquatable<T>
IInterfaceUriBindingContainer
IInterfaceUri
IBindingContainer
ICloneable<T>
System.IComparable<T>
System.IEquatable<T>

Extension Methods

SolverUtils.AddCommand(ImplementationSelection, Requirements, Implementation)

See Also

Implementations
In This Article
Back to top Copyright Bastian Eicher et al