Table of Contents

Struct VersionDottedList

Namespace
ZeroInstall.Model
Assembly
ZeroInstall.Model.dll

Represents a dotted-list part of a ImplementationVersion.

[Serializable]
public readonly struct VersionDottedList : IEquatable<VersionDottedList>, IComparable<VersionDottedList>
Implements
Inherited Members

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

decimals long[]

The numeric parts of the dotted-list.

Properties

Decimals

The individual decimals.

public IReadOnlyList<long>? Decimals { get; }

Property Value

IReadOnlyList<long>

Methods

CompareTo(VersionDottedList)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(VersionDottedList other)

Parameters

other VersionDottedList

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(VersionDottedList)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(VersionDottedList other)

Parameters

other VersionDottedList

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

IsValid(string)

Checks whether a string represents a valid dotted-list.

public static bool IsValid(string value)

Parameters

value string

Returns

bool

Parse(string)

Parses a string into a version dotted-list.

public static VersionDottedList Parse(string value)

Parameters

value string

Returns

VersionDottedList

Exceptions

FormatException

value is not a valid version dotted-list.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(VersionDottedList, VersionDottedList)

public static bool operator ==(VersionDottedList left, VersionDottedList right)

Parameters

left VersionDottedList
right VersionDottedList

Returns

bool

operator >(VersionDottedList, VersionDottedList)

public static bool operator >(VersionDottedList left, VersionDottedList right)

Parameters

left VersionDottedList
right VersionDottedList

Returns

bool

operator >=(VersionDottedList, VersionDottedList)

public static bool operator >=(VersionDottedList left, VersionDottedList right)

Parameters

left VersionDottedList
right VersionDottedList

Returns

bool

operator !=(VersionDottedList, VersionDottedList)

public static bool operator !=(VersionDottedList left, VersionDottedList right)

Parameters

left VersionDottedList
right VersionDottedList

Returns

bool

operator <(VersionDottedList, VersionDottedList)

public static bool operator <(VersionDottedList left, VersionDottedList right)

Parameters

left VersionDottedList
right VersionDottedList

Returns

bool

operator <=(VersionDottedList, VersionDottedList)

public static bool operator <=(VersionDottedList left, VersionDottedList right)

Parameters

left VersionDottedList
right VersionDottedList

Returns

bool