Semantic version number, http://semver.org/.
More...
|
|
string | VersionString [get] |
| | Get string rep of version number.
|
| |
|
string | ReleaseState [get] |
| | Release state string. "null" if no state/release.
|
| |
|
int | Major [get] |
| | Major version, only increase for incompatible API changes.
|
| |
|
int | Minor [get] |
| | Minor version, increase for backwards compatible added/changed functionality.
|
| |
|
int | Patch [get] |
| | Patch version, increase for bugfixes not affectiong API/interface.
|
| |
Semantic version number, http://semver.org/.
◆ SemanticVersionNumber()
| TPG.Utils.SemanticVersionNumber.SemanticVersionNumber |
( |
int |
major, |
|
|
int |
minor, |
|
|
int |
patch, |
|
|
string |
releaseState = null |
|
) |
| |
|
inline |
- Parameters
-
| major | Major version, incompatible API changes |
| minor | Minor version, backwards compatible added/changed functionality |
| patch | Backwards compatible bugfixes |
| releaseState | String identifying (pre) release state, ex "RC", "DRAFT". If not set, "release" type version is assumed (default) |
◆ Compare()
Compare version numbers "a" and "b".
- Parameters
-
| a | First version number |
| b | Second version number |
- Returns
- -2 on error, -1 if a less than b, 0 if a equals b, 1 if a larger than b
◆ GetNextMajorVersion()
| SemanticVersionNumber TPG.Utils.SemanticVersionNumber.GetNextMajorVersion |
( |
string |
releaseStateString = null | ) |
|
|
inline |
Get new version instance with next major version.
- Parameters
-
| releaseStateString | Optional release state string |
- Returns
- New version
◆ GetNextMinorVersion()
| SemanticVersionNumber TPG.Utils.SemanticVersionNumber.GetNextMinorVersion |
( |
string |
releaseStateString = null | ) |
|
|
inline |
Get new version instance with next minor version.
- Parameters
-
| releaseStateString | Optional release state string |
- Returns
- New version
◆ GetNextPatchVersion()
| SemanticVersionNumber TPG.Utils.SemanticVersionNumber.GetNextPatchVersion |
( |
string |
releaseStateString = null | ) |
|
|
inline |
Get new version instance with next patch version.
- Parameters
-
| releaseStateString | Optional release state string |
- Returns
- New version
◆ Parse()
Parse string rep of version number.
- Parameters
-
| verString | String on format MAJOR.MINOR.PATCH[-RELEASESTATE] |
- Parameters
-
| defaultVersion | Return default if parsing fails |
The documentation for this class was generated from the following file:
- Src/Libraries/TPG.Utils/SemanticVersionNumber.cs