Click or drag to resize

SemanticVersion Class

A class to parse and compare semantic versions. (https://semver.org/)
Inheritance Hierarchy
SystemObject
  TomsToolbox.EssentialsSemanticVersion

Namespace: TomsToolbox.Essentials
Assembly: TomsToolbox.Essentials (in TomsToolbox.Essentials.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public class SemanticVersion : IEquatable<SemanticVersion>, 
	IComparable<SemanticVersion>

The SemanticVersion type exposes the following members.

Constructors
 NameDescription
Public methodSemanticVersion Initializes a new default instance of the SemanticVersion class.
Public methodSemanticVersion(Version, String) Initializes a new instance of the SemanticVersion class.
Top
Properties
 NameDescription
Public propertySuffix Gets the suffix.
Public propertyVersion Gets the version.
Top
Methods
 NameDescription
Public methodCompareToCompares 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 methodEquals(Object)Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object))
Public methodEquals(SemanticVersion)Indicates whether the current object is equal to another object of the same type.
Public methodGetHashCodeServes as the default hash function.
(Overrides ObjectGetHashCode)
Public methodStatic memberParse Parses the specified semantic version. Any prefix or suffix strings are ignored, e.g. "Version 1.2.3-beta1 with extras" is parsed as "1.2.3-beta1"
Public methodToStringReturns a string that represents the current object.
(Overrides ObjectToString)
Top
Operators
 NameDescription
Public operatorStatic memberEquality(SemanticVersion, SemanticVersion) Implements the operator ==.
Public operatorStatic memberGreaterThan(SemanticVersion, SemanticVersion) Implements the operator >.
Public operatorStatic memberGreaterThanOrEqual(SemanticVersion, SemanticVersion) Implements the operator >=.
Public operatorStatic memberInequality(SemanticVersion, SemanticVersion) Implements the operator !=.
Public operatorStatic memberLessThan(SemanticVersion, SemanticVersion) Implements the operator <.
Public operatorStatic memberLessThanOrEqual(SemanticVersion, SemanticVersion) Implements the operator <=.
Top
Extension Methods
 NameDescription
Public Extension MethodSafeCastT Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions)
Top
See Also