Nucleus .Net Core CMS

VersionExtensions Class

Namespace: Nucleus.Extensions
Assembly: Nucleus.Extensions.dll
Extensions for the System.Version class.

Methods

IsLessThan (Version,String) Method

IsLessThan (Version version, String compareToVersion)
Returns a valid indicating whether the specified string represents a version which is less than this version.
Parameters
Name Type
version Version
compareToVersion String
Remarks
compareToVersion should contain a string in the form of a version, but can contain a '*' in place of any of the version fields.

IsGreaterThan (Version,String) Method

IsGreaterThan (Version version, String compareToVersion)
Returns a valid indicating whether the specified string represents a version which is greater than this version.
Parameters
Name Type
version Version
compareToVersion String
Remarks
compareToVersion should contain a string in the form of a version, but can contain a '*' in place of any of the version fields.

CheckMinorVersion (String) Method

CheckMinorVersion (String version)
Return a string representation of the version with '.0' appended, if the specified version contains only a number ('major' version).
Parameters
Name Type
version String
Remarks
This function is used to ensure that a string version has at least a major.minor version number, so that it can be parsed by Version.Parse().