Class Dependency
A reference to an interface that is required as dependency.
Implements
Inherited Members
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public class Dependency : Restriction, IInterfaceUriBindingContainer, IInterfaceUri, IBindingContainer
Constructors
Dependency()
Declaration
public Dependency()
Properties
Bindings
A list of Bindings for Implementations to locate Dependencys.
Declaration
public List<Binding> Bindings { get; }
Property Value
Type | Description |
---|---|
List<Binding> |
Importance
Controls how important this dependency is (i.e. whether ignoring it is an option).
Declaration
public Importance Importance { get; set; }
Property Value
Type | Description |
---|---|
Importance |
Use
This can be used to indicate that this dependency is only needed in some cases. Deprecated; use Commands instead.
Declaration
public string Use { get; set; }
Property Value
Type | Description |
---|---|
String |
XmlTagName
Declaration
protected override string XmlTagName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
Methods
Clone()
Creates a deep copy of this Dependency instance.
Declaration
public override Restriction Clone()
Returns
Type | Description |
---|---|
Restriction | The new copy of the Dependency. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(Dependency)
Declaration
public bool Equals(Dependency other)
Parameters
Type | Name | Description |
---|---|---|
Dependency | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
IsApplicable(Requirements)
Determines whether this reference is applicable for the given requirements
.
Declaration
public override bool IsApplicable(Requirements requirements)
Parameters
Type | Name | Description |
---|---|---|
Requirements | requirements |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Normalize()
Flattens inheritance structures, Converts legacy elements, sets default values, etc..
Declaration
public override void Normalize()
Overrides
Exceptions
Type | Condition |
---|---|
InvalidDataException | A required property is not set or invalid. |
ToString()
Returns the dependency in the form "Interface (Use)". Not safe for parsing!
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
Equality(Dependency, Dependency)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(Dependency left, Dependency right)
Parameters
Type | Name | Description |
---|---|---|
Dependency | left | The left object |
Dependency | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(Dependency, Dependency)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(Dependency left, Dependency right)
Parameters
Type | Name | Description |
---|---|---|
Dependency | left | The left object |
Dependency | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |