Skip to content

Class SemVersion

Namespace: DotBoxD.Kernels.Model
Assembly: DotBoxD.Kernels.dll

public sealed record SemVersion : IComparable<SemVersion>, IEquatable<SemVersion>

objectSemVersion

IComparable<SemVersion>, IEquatable<SemVersion>

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

public SemVersion(int Major, int Minor, int Patch)

Major int

Minor int

Patch int

public int Major { get; init; }

int

public int Minor { get; init; }

int

public static SemVersion One { get; }

SemVersion

public int Patch { get; init; }

int

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(SemVersion? other)

other SemVersion?

An object to compare with this instance.

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.
public static SemVersion Parse(string text)

text string

SemVersion

Returns a string that represents the current object.

public override string ToString()

string

A string that represents the current object.

public static bool TryParse(string text, out SemVersion version)

text string

version SemVersion

bool