Table of Contents

Class ExternalImplementation

Namespace
ZeroInstall.Services.Native
Assembly
ZeroInstall.Services.dll

An implementation provided by an external package manager.

[Equatable]
public sealed class ExternalImplementation : Implementation, IEquatable<XmlUnknown>, IEquatable<FeedElement>, IEquatable<TargetBase>, IBindingContainer, IDependencyContainer, ICloneable<Element>, IEquatable<Element>, IEquatable<ImplementationBase>, IEquatable<Implementation>, IEquatable<ExternalImplementation>
Inheritance
ExternalImplementation
Implements
Inherited Members
Extension Methods

Constructors

ExternalImplementation(string, string, ImplementationVersion, Cpu)

Creates a new external implementation.

public ExternalImplementation(string distribution, string package, ImplementationVersion version, Cpu cpu = Cpu.All)

Parameters

distribution string

The name of the distribution (e.g. Debian, RPM) where this implementation comes from.

package string

The name of the package in the distribution.

version ImplementationVersion

The version number of the implementation.

cpu Cpu

For platform-specific binaries, the CPU architecture for which the implementation was compiled.

Fields

PackagePrefix

This is prepended to ID for all ExternalImplementation.

public const string PackagePrefix = "package:"

Field Value

string

Remarks

Also used to mark regular Implementations that act as proxies for ExternalImplementations.

Properties

Distribution

The name of the distribution (e.g. Debian, RPM) where this implementation comes from.

public string Distribution { get; set; }

Property Value

string

IsInstalled

Indicates whether this implementation is currently installed.

public bool IsInstalled { get; set; }

Property Value

bool

Package

The name of the package in the Distribution.

public string Package { get; set; }

Property Value

string

QuickTestFile

A file which, if present, indicates that this implementation IsInstalled.

public string? QuickTestFile { get; set; }

Property Value

string

Remarks

This makes it possible to avoid Lookup(ImplementationSelection) calls for better performance.

See Also

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.

FromID(string)

Creates a new external implementation from an ID.

public static ExternalImplementation FromID(string id)

Parameters

id string

The ID to parse.

Returns

ExternalImplementation

Exceptions

FormatException

id is not a standard ExternalImplementation ID.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns the implementation in the form "Comma-separated list of set values". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(ExternalImplementation?, ExternalImplementation?)

Indicates whether the object on the left is equal to the object on the right.

public static bool operator ==(ExternalImplementation? left, ExternalImplementation? right)

Parameters

left ExternalImplementation

The left object

right ExternalImplementation

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(ExternalImplementation?, ExternalImplementation?)

Indicates whether the object on the left is not equal to the object on the right.

public static bool operator !=(ExternalImplementation? left, ExternalImplementation? right)

Parameters

left ExternalImplementation

The left object

right ExternalImplementation

The right object

Returns

bool

true if the objects are not equal; otherwise, false.

See Also