Table of Contents

Class Dependency

Namespace
ZeroInstall.Model
Assembly
ZeroInstall.Model.dll

A reference to an interface that is required as dependency.

[Serializable]
[Equatable]
public class Dependency : Restriction, IEquatable<XmlUnknown>, IEquatable<FeedElement>, ICloneable<Restriction>, IEquatable<Restriction>, IInterfaceUriBindingContainer, IInterfaceUri, IBindingContainer, ICloneable<Dependency>, IEquatable<Dependency>
Inheritance
Dependency
Implements
Derived
Inherited Members

Properties

Bindings

A list of Bindings for Implementations to locate Dependencys.

[Browsable(false)]
[OrderedEquality]
public List<Binding> Bindings { get; }

Property Value

List<Binding>

Importance

Controls how important this dependency is (i.e. whether ignoring it is an option).

public Importance Importance { get; set; }

Property Value

Importance

Use

This can be used to indicate that this dependency is only needed in some cases. Deprecated; use Commands instead.

public string? Use { get; set; }

Property Value

string

XmlTagName

protected override string XmlTagName { get; }

Property Value

string

Methods

Clone()

Creates a deep copy of this Dependency instance.

public override Restriction Clone()

Returns

Restriction

The new copy of the Dependency.

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(Dependency?)

protected bool Equals(Dependency? other)

Parameters

other Dependency

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsApplicable(Requirements)

Determines whether this reference is applicable for the given requirements.

public override bool IsApplicable(Requirements requirements)

Parameters

requirements Requirements

Returns

bool

Normalize()

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

public override void Normalize()

Exceptions

InvalidDataException

A required property is not set or invalid.

ToString()

Returns the dependency in the form "Interface (Use)". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(Dependency?, Dependency?)

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

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

Parameters

left Dependency

The left object

right Dependency

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(Dependency?, Dependency?)

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

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

Parameters

left Dependency

The left object

right Dependency

The right object

Returns

bool

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