Struct VersionDottedList
- Namespace
- ZeroInstall.Model
- Assembly
- ZeroInstall.Model.dll
Represents a dotted-list part of a ImplementationVersion.
public readonly struct VersionDottedList : IEquatable<VersionDottedList>, IComparable<VersionDottedList>
- Implements
Remarks
This is the syntax for valid dot-separated decimals:
DottedList := (Integer ("." Integer)*)
Constructors
VersionDottedList(params long[])
Creates a new version dotted-list.
public VersionDottedList(params long[] decimals)
Parameters
decimalslong[]The numeric parts of the dotted-list.
Properties
Decimals
The individual decimals.
public IReadOnlyList<long>? Decimals { get; }
Property Value
Methods
CompareTo(VersionDottedList)
public int CompareTo(VersionDottedList other)
Parameters
otherVersionDottedList
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(VersionDottedList)
public bool Equals(VersionDottedList other)
Parameters
otherVersionDottedList
Returns
GetHashCode()
public override int GetHashCode()
Returns
IsValid(string)
Checks whether a string represents a valid dotted-list.
public static bool IsValid(string value)
Parameters
valuestring
Returns
Parse(string)
Parses a string into a version dotted-list.
public static VersionDottedList Parse(string value)
Parameters
valuestring
Returns
Exceptions
- FormatException
valueis not a valid version dotted-list.
ToString()
public override string ToString()
Returns
Operators
operator ==(VersionDottedList, VersionDottedList)
public static bool operator ==(VersionDottedList left, VersionDottedList right)
Parameters
leftVersionDottedListrightVersionDottedList
Returns
operator >(VersionDottedList, VersionDottedList)
public static bool operator >(VersionDottedList left, VersionDottedList right)
Parameters
leftVersionDottedListrightVersionDottedList
Returns
operator >=(VersionDottedList, VersionDottedList)
public static bool operator >=(VersionDottedList left, VersionDottedList right)
Parameters
leftVersionDottedListrightVersionDottedList
Returns
operator !=(VersionDottedList, VersionDottedList)
public static bool operator !=(VersionDottedList left, VersionDottedList right)
Parameters
leftVersionDottedListrightVersionDottedList
Returns
operator <(VersionDottedList, VersionDottedList)
public static bool operator <(VersionDottedList left, VersionDottedList right)
Parameters
leftVersionDottedListrightVersionDottedList
Returns
operator <=(VersionDottedList, VersionDottedList)
public static bool operator <=(VersionDottedList left, VersionDottedList right)
Parameters
leftVersionDottedListrightVersionDottedList