Semantic Versioning
One version is enough to identify how old this work is!
Semantic versioning is another extra Textify feature that checks the stringified version to see if it is SemVer 2.0 compliant.
Parsing semantic version string
To parse your semantic version string, for example, 1.0.0-alpha1 or 1.0.0.0-alpha1, you must define a variable that has the type of SemVer. Then, call one of the following functions:
SemVer.Parse()
Parses either the full or the 3-component versions
SemVer.ParseWithoutRev()
Parses the 3-component version.
SemVer.ParseWithRev()
Parses the full version.
A simple example on how to get a SemVer instance from the version string is:
SemVer semVer = SemVer.Parse(version);Once the parser finishes parsing your semantic version string, it returns a SemVer class instance.
Version information class
A SemVer class instance contains the necessary information about your version:
MajorVersion
Major version
MinorVersion
Minor version
PatchVersion
Patch version
RevisionVersion
Revision version
PreReleaseInfo
Pre-Release info
BuildMetadata
Build metadata
Version information equality operators
As for the equality operators, this class supports the following operators:
==
Checks to see if both SemVer versions are equal.
!=
Checks to see if both SemVer versions are opposite to each other.
<
Checks to see if a is older than b.
>
Checks to see if a is newer than b.
<=
Checks to see if a is older or equal to b.
>=
Checks to see if a is newer or equal to b.
Last updated