Table of Contents

Class ImplementationBase

Namespace
ZeroInstall.Model
Assembly
ZeroInstall.Model.dll

Information for identifying an implementation of a Feed. Common base for Implementation and ImplementationSelection.

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

Properties

ID

A unique identifier for this implementation. Used when storing implementation-specific user preferences.

public required string ID { get; set; }

Property Value

string

LocalPath

If the feed file is a local file (the interface 'uri' starts with /) then the local-path attribute may contain the pathname of a local directory (either an absolute path or a path relative to the directory containing the feed file).

public string? LocalPath { get; set; }

Property Value

string

ManifestDigest

A manifest digest is a means of uniquely identifying an Implementation and verifying its contents.

public ManifestDigest ManifestDigest { get; set; }

Property Value

ManifestDigest

Version

The version number of the implementation.

public override required ImplementationVersion Version { get; set; }

Property Value

ImplementationVersion

Methods

CloneFromTo(ImplementationBase, ImplementationBase)

Copies all known values from one instance to another. Helper method for instance cloning.

protected static void CloneFromTo(ImplementationBase from, ImplementationBase to)

Parameters

from ImplementationBase
to ImplementationBase

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.

Equals(ImplementationBase?)

protected bool Equals(ImplementationBase? other)

Parameters

other ImplementationBase

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Normalize(FeedUri?)

Flattens inheritance structures, Converts legacy elements, sets default values, etc..

public override void Normalize(FeedUri? feedUri = null)

Parameters

feedUri FeedUri

The feed the data was originally loaded from.

Exceptions

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!

public override string ToString()

Returns

string

Operators

operator ==(ImplementationBase?, ImplementationBase?)

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

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

Parameters

left ImplementationBase

The left object

right ImplementationBase

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(ImplementationBase?, ImplementationBase?)

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

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

Parameters

left ImplementationBase

The left object

right ImplementationBase

The right object

Returns

bool

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