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
stringThe name of the distribution (e.g. Debian, RPM) where this implementation comes from.
package
stringThe name of the package in the
distribution
.version
ImplementationVersionThe version number of the implementation.
cpu
CpuFor 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
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
IsInstalled
Indicates whether this implementation is currently installed.
public bool IsInstalled { get; set; }
Property Value
Package
The name of the package in the Distribution.
public string Package { get; set; }
Property Value
QuickTestFile
A file which, if present, indicates that this implementation IsInstalled.
public string? QuickTestFile { get; set; }
Property Value
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
objectThe object to compare with the current object.
Returns
FromID(string)
Creates a new external implementation from an ID.
public static ExternalImplementation FromID(string id)
Parameters
id
stringThe ID to parse.
Returns
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
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
ExternalImplementationThe left object
right
ExternalImplementationThe 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
ExternalImplementationThe left object
right
ExternalImplementationThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.