Class SemVersion
Namespace: DotBoxD.Kernels.Model
Assembly: DotBoxD.Kernels.dll
public sealed record SemVersion : IComparable<SemVersion>, IEquatable<SemVersion>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”IComparable<SemVersion>, IEquatable<SemVersion>
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”SemVersion(int, int, int)
Section titled “ SemVersion(int, int, int)”public SemVersion(int Major, int Minor, int Patch)Parameters
Section titled “Parameters”Major int
Minor int
Patch int
Properties
Section titled “Properties”public int Major { get; init; }Property Value
Section titled “Property Value”public int Minor { get; init; }Property Value
Section titled “Property Value”public static SemVersion One { get; }Property Value
Section titled “Property Value”public int Patch { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”CompareTo(SemVersion?)
Section titled “ 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
Section titled “Parameters”other SemVersion?
An object to compare with this instance.
Returns
Section titled “Returns”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)
Section titled “ Parse(string)”public static SemVersion Parse(string text)Parameters
Section titled “Parameters”text string
Returns
Section titled “Returns”ToString()
Section titled “ ToString()”Returns a string that represents the current object.
public override string ToString()Returns
Section titled “Returns”A string that represents the current object.
TryParse(string, out SemVersion)
Section titled “ TryParse(string, out SemVersion)”public static bool TryParse(string text, out SemVersion version)Parameters
Section titled “Parameters”text string
version SemVersion