Table of Contents

Class PackageImplementation

Namespace
ZeroInstall.Model
Assembly
ZeroInstall.Model.dll

An implementation provided by a distribution-specific package manager instead of Zero Install.

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

Remarks

Any Bindings inside Dependencys for the Feed will be ignored; it is assumed that the requiring component knows how to use the packaged version without further help.

Fields

DistributionNames

Well-known values for Distributions.

public static readonly string[] DistributionNames

Field Value

string[]

Properties

Distributions

A list of distribution names (e.g. Debian, RPM) where Package applies. Applies everywhere if empty.

[Browsable(false)]
[OrderedEquality]
public List<string> Distributions { get; }

Property Value

List<string>

DistributionsString

Used for XML serialization.

[TypeConverter(typeof(DistributionNameConverter))]
[IgnoreEquality]
public string DistributionsString { get; set; }

Property Value

string
See Also

Package

The name of the package in the distribution-specific package manager.

public string? Package { get; set; }

Property Value

string

Version

The range of versions to accept for the specified Package.

public VersionRange? Version { get; set; }

Property Value

VersionRange

Methods

Clone()

Creates a deep copy of this PackageImplementation instance.

public override Element Clone()

Returns

Element

The new copy of the PackageImplementation.

CloneImplementation()

Creates a deep copy of this PackageImplementation instance.

public PackageImplementation CloneImplementation()

Returns

PackageImplementation

The new copy of the PackageImplementation.

EnsureAttributes()

Ensures that required values deserialized from XML attributes are set (not null).

protected override void EnsureAttributes()

Exceptions

InvalidDataException

A required property is not set or invalid.

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.

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 "Package (Distributions)". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(PackageImplementation?, PackageImplementation?)

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

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

Parameters

left PackageImplementation

The left object

right PackageImplementation

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(PackageImplementation?, PackageImplementation?)

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

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

Parameters

left PackageImplementation

The left object

right PackageImplementation

The right object

Returns

bool

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