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
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
ManifestDigest
A manifest digest is a means of uniquely identifying an Implementation and verifying its contents.
public ManifestDigest ManifestDigest { get; set; }
Property Value
Version
The version number of the implementation.
public override required ImplementationVersion Version { get; set; }
Property Value
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
ImplementationBaseto
ImplementationBase
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
Equals(ImplementationBase?)
protected bool Equals(ImplementationBase? other)
Parameters
other
ImplementationBase
Returns
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
FeedUriThe 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
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
ImplementationBaseThe left object
right
ImplementationBaseThe 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
ImplementationBaseThe left object
right
ImplementationBaseThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.