Class ImplementationVersion
Represents a version number consisting of dot-separated decimals and optional modifier strings.
Inheritance
ImplementationVersion
Assembly: ZeroInstall.Model.dll
Syntax
public sealed class ImplementationVersion : Object
Constructors
ImplementationVersion(String)
Creates a new implementation version from a a string.
Declaration
public ImplementationVersion(string value)
Parameters
Type |
Name |
Description |
String |
value |
The string containing the version information.
|
Exceptions
ImplementationVersion(Version)
Creates a new implementation version from a .NET Version.
Declaration
public ImplementationVersion(Version version)
Parameters
ImplementationVersion(VersionDottedList, VersionPart[])
Creates a new implementation version.
Declaration
public ImplementationVersion(VersionDottedList firstPart, params VersionPart[] additionalParts)
Parameters
Type |
Name |
Description |
VersionDottedList |
firstPart |
The first part of the version number.
|
VersionPart[] |
additionalParts |
All additional parts of the version number.
|
Properties
AdditionalParts
All additional parts of the version number.
Declaration
public IReadOnlyList<VersionPart> AdditionalParts { get; }
Property Value
ContainsTemplateVariables
Indicates whether this version number contains a template variable (a substring enclosed in curly brackets, e.g {var}) .
Declaration
public bool ContainsTemplateVariables { get; }
Property Value
FirstPart
The first part of the version number.
Declaration
public VersionDottedList FirstPart { get; }
Property Value
Methods
CompareTo(ImplementationVersion)
Declaration
public int CompareTo(ImplementationVersion other)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Equals(ImplementationVersion)
Declaration
public bool Equals(ImplementationVersion other)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
ToString()
Returns a string representation of the version. Safe for parsing!
Declaration
public override string ToString()
Returns
TryCreate(String, out ImplementationVersion)
Declaration
public static bool TryCreate(string value, out ImplementationVersion result)
Parameters
Returns
Operators
Equality(ImplementationVersion, ImplementationVersion)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(ImplementationVersion left, ImplementationVersion right)
Parameters
Returns
Type |
Description |
Boolean |
true if the objects are equal; otherwise, false.
|
GreaterThan(ImplementationVersion, ImplementationVersion)
Declaration
public static bool operator>(ImplementationVersion left, ImplementationVersion right)
Parameters
Returns
GreaterThanOrEqual(ImplementationVersion, ImplementationVersion)
Declaration
public static bool operator >=(ImplementationVersion left, ImplementationVersion right)
Parameters
Returns
Inequality(ImplementationVersion, ImplementationVersion)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(ImplementationVersion left, ImplementationVersion right)
Parameters
Returns
Type |
Description |
Boolean |
true if the objects are not equal; otherwise, false.
|
LessThan(ImplementationVersion, ImplementationVersion)
Declaration
public static bool operator <(ImplementationVersion left, ImplementationVersion right)
Parameters
Returns
LessThanOrEqual(ImplementationVersion, ImplementationVersion)
Declaration
public static bool operator <=(ImplementationVersion left, ImplementationVersion right)
Parameters
Returns
Implements