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
NotBefore
This is the lowest-numbered version that can be chosen.
public ImplementationVersion? NotBefore { get; set; }
Property Value
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
objectThe object to compare with the current object.
Returns
Equals(Constraint?)
protected bool Equals(Constraint? other)
Parameters
other
Constraint
Returns
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
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
ConstraintThe left object
right
ConstraintThe 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
ConstraintThe left object
right
ConstraintThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.