Table of Contents

Class SemVersion

Namespace
DotBoxD.Kernels.Model
Assembly
DotBoxD.Kernels.dll
public sealed record SemVersion : IComparable<SemVersion>, IEquatable<SemVersion>
Inheritance
SemVersion
Implements
Inherited Members

Constructors

SemVersion(int, int, int)

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

Parameters

Major int
Minor int
Patch int

Properties

Major

public int Major { get; init; }

Property Value

int

Minor

public int Minor { get; init; }

Property Value

int

One

public static SemVersion One { get; }

Property Value

SemVersion

Patch

public int Patch { get; init; }

Property Value

int

Methods

CompareTo(SemVersion?)

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)

Parameters

other SemVersion

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.

Parse(string)

public static SemVersion Parse(string text)

Parameters

text string

Returns

SemVersion

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryParse(string, out SemVersion)

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

Parameters

text string
version SemVersion

Returns

bool