Table of Contents

Class Constraint

Namespace
ZeroInstall.Model
Assembly
ZeroInstall.Model.dll

Restricts the set of versions from which the injector may choose an Implementation.

[Serializable]
[Equatable]
public class Constraint : FeedElement, IEquatable<XmlUnknown>, IEquatable<FeedElement>, ICloneable<Constraint>, IEquatable<Constraint>
Inheritance
Constraint
Implements
Inherited Members

Properties

Before

This version and all later versions are unsuitable.

public ImplementationVersion? Before { get; set; }

Property Value

ImplementationVersion

NotBefore

This is the lowest-numbered version that can be chosen.

public ImplementationVersion? NotBefore { get; set; }

Property Value

ImplementationVersion

Methods

Clone()

Creates a copy of this Constraint instance.

public Constraint Clone()

Returns

Constraint

The new copy of the Constraint.

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

protected bool Equals(Constraint? other)

Parameters

other Constraint

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns the constraint in the form "NotBefore =< Ver %lt; Before". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(Constraint?, Constraint?)

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

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

Parameters

left Constraint

The left object

right Constraint

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(Constraint?, Constraint?)

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

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

Parameters

left Constraint

The left object

right Constraint

The right object

Returns

bool

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