Daniel's XL Toolbox NG
Bovender.Versioning.SemanticVersion Class Reference

Class that handles semantic versioning. More...

Inheritance diagram for Bovender.Versioning.SemanticVersion:
Collaboration diagram for Bovender.Versioning.SemanticVersion:

Public Member Functions

 SemanticVersion (string version)
 Instantiates the class from a given version string. More...
 
 SemanticVersion ()
 
int CompareTo (object obj)
 
override bool Equals (object obj)
 
override string ToString ()
 Returns the full version string. More...
 
override int GetHashCode ()
 
 SemanticVersion (string version)
 Instantiates the class from a given version string. More...
 
 SemanticVersion ()
 
int CompareTo (object obj)
 
override bool Equals (object obj)
 
override string ToString ()
 Returns the full version string. More...
 
override int GetHashCode ()
 

Static Public Member Functions

static SemanticVersion CurrentVersion ()
 Factory method that creates an instance of the Version class with the current version information, which must be contained in a file called "VERSION" on the root level of the current entry assembly. More...
 
static SemanticVersion CurrentVersion (Assembly assembly)
 Factory method that creates an instance of the Version class with the current version information, which must be contained in a file called "VERSION" that is built as an embedded resource. The first embedded "RESOURCE" file that is found in all the namespaces of assembly will be used. More...
 
static bool operator< (SemanticVersion lower, SemanticVersion higher)
 
static bool operator> (SemanticVersion higher, SemanticVersion lower)
 
static bool operator<= (SemanticVersion lower, SemanticVersion higher)
 
static bool operator>= (SemanticVersion higher, SemanticVersion lower)
 
static bool operator== (SemanticVersion v1, SemanticVersion v2)
 
static bool operator!= (SemanticVersion v1, SemanticVersion v2)
 
static SemanticVersion CurrentVersion ()
 Factory method that creates an instance of the Version class with the current version information, which must be contained in a file called "VERSION" on the root level of the current entry assembly. More...
 
static SemanticVersion CurrentVersion (Assembly assembly)
 Factory method that creates an instance of the Version class with the current version information, which must be contained in a file called "VERSION" that is built as an embedded resource. The first embedded "RESOURCE" file that is found in all the namespaces of assembly will be used. More...
 
static bool operator< (SemanticVersion lower, SemanticVersion higher)
 
static bool operator> (SemanticVersion higher, SemanticVersion lower)
 
static bool operator<= (SemanticVersion lower, SemanticVersion higher)
 
static bool operator>= (SemanticVersion higher, SemanticVersion lower)
 
static bool operator== (SemanticVersion v1, SemanticVersion v2)
 
static bool operator!= (SemanticVersion v1, SemanticVersion v2)
 

Protected Member Functions

void ParseString (string s)
 Parses a string that complies with semantic versioning, V. 2. More...
 
void BuildString ()
 
void ParseString (string s)
 Parses a string that complies with semantic versioning, V. 2. More...
 
void BuildString ()
 

Properties

int Major [get, set]
 
int Minor [get, set]
 
int Patch [get, set]
 
Prerelease Prerelease [get, set]
 
int PreMajor [get, set]
 
int PreMinor [get, set]
 
int PrePatch [get, set]
 
string Build [get, set]
 

Detailed Description

Class that handles semantic versioning.

Constructor & Destructor Documentation

◆ SemanticVersion() [1/4]

Bovender.Versioning.SemanticVersion.SemanticVersion ( string  version)
inline

Instantiates the class from a given version string.

Parameters
versionString that complies with semantic versioning rules.

◆ SemanticVersion() [2/4]

Bovender.Versioning.SemanticVersion.SemanticVersion ( )
inline

◆ SemanticVersion() [3/4]

Bovender.Versioning.SemanticVersion.SemanticVersion ( string  version)
inline

Instantiates the class from a given version string.

Parameters
versionString that complies with semantic versioning rules.

◆ SemanticVersion() [4/4]

Bovender.Versioning.SemanticVersion.SemanticVersion ( )
inline

Member Function Documentation

◆ BuildString() [1/2]

void Bovender.Versioning.SemanticVersion.BuildString ( )
inlineprotected

◆ BuildString() [2/2]

void Bovender.Versioning.SemanticVersion.BuildString ( )
inlineprotected

◆ CompareTo() [1/2]

int Bovender.Versioning.SemanticVersion.CompareTo ( object  obj)
inline

◆ CompareTo() [2/2]

int Bovender.Versioning.SemanticVersion.CompareTo ( object  obj)
inline

◆ CurrentVersion() [1/4]

static SemanticVersion Bovender.Versioning.SemanticVersion.CurrentVersion ( )
inlinestatic

Factory method that creates an instance of the Version class with the current version information, which must be contained in a file called "VERSION" on the root level of the current entry assembly.

Note that this will throw an exception if called inside a VSTO addin.

Returns
Instance of Version

◆ CurrentVersion() [2/4]

static SemanticVersion Bovender.Versioning.SemanticVersion.CurrentVersion ( )
inlinestatic

Factory method that creates an instance of the Version class with the current version information, which must be contained in a file called "VERSION" on the root level of the current entry assembly.

Note that this will throw an exception if called inside a VSTO addin.

Returns
Instance of Version

◆ CurrentVersion() [3/4]

static SemanticVersion Bovender.Versioning.SemanticVersion.CurrentVersion ( Assembly  assembly)
inlinestatic

Factory method that creates an instance of the Version class with the current version information, which must be contained in a file called "VERSION" that is built as an embedded resource. The first embedded "RESOURCE" file that is found in all the namespaces of assembly will be used.

Parameters
assemblyAssembly that contains the VERSION file.
Returns
Instance of Version

◆ CurrentVersion() [4/4]

static SemanticVersion Bovender.Versioning.SemanticVersion.CurrentVersion ( Assembly  assembly)
inlinestatic

Factory method that creates an instance of the Version class with the current version information, which must be contained in a file called "VERSION" that is built as an embedded resource. The first embedded "RESOURCE" file that is found in all the namespaces of assembly will be used.

Parameters
assemblyAssembly that contains the VERSION file.
Returns
Instance of Version

◆ Equals() [1/2]

override bool Bovender.Versioning.SemanticVersion.Equals ( object  obj)
inline

◆ Equals() [2/2]

override bool Bovender.Versioning.SemanticVersion.Equals ( object  obj)
inline

◆ GetHashCode() [1/2]

override int Bovender.Versioning.SemanticVersion.GetHashCode ( )
inline

◆ GetHashCode() [2/2]

override int Bovender.Versioning.SemanticVersion.GetHashCode ( )
inline

◆ operator!=() [1/2]

static bool Bovender.Versioning.SemanticVersion.operator!= ( SemanticVersion  v1,
SemanticVersion  v2 
)
inlinestatic

◆ operator!=() [2/2]

static bool Bovender.Versioning.SemanticVersion.operator!= ( SemanticVersion  v1,
SemanticVersion  v2 
)
inlinestatic

◆ operator<() [1/2]

static bool Bovender.Versioning.SemanticVersion.operator< ( SemanticVersion  lower,
SemanticVersion  higher 
)
inlinestatic

◆ operator<() [2/2]

static bool Bovender.Versioning.SemanticVersion.operator< ( SemanticVersion  lower,
SemanticVersion  higher 
)
inlinestatic

◆ operator<=() [1/2]

static bool Bovender.Versioning.SemanticVersion.operator<= ( SemanticVersion  lower,
SemanticVersion  higher 
)
inlinestatic

◆ operator<=() [2/2]

static bool Bovender.Versioning.SemanticVersion.operator<= ( SemanticVersion  lower,
SemanticVersion  higher 
)
inlinestatic

◆ operator==() [1/2]

static bool Bovender.Versioning.SemanticVersion.operator== ( SemanticVersion  v1,
SemanticVersion  v2 
)
inlinestatic

◆ operator==() [2/2]

static bool Bovender.Versioning.SemanticVersion.operator== ( SemanticVersion  v1,
SemanticVersion  v2 
)
inlinestatic

◆ operator>() [1/2]

static bool Bovender.Versioning.SemanticVersion.operator> ( SemanticVersion  higher,
SemanticVersion  lower 
)
inlinestatic

◆ operator>() [2/2]

static bool Bovender.Versioning.SemanticVersion.operator> ( SemanticVersion  higher,
SemanticVersion  lower 
)
inlinestatic

◆ operator>=() [1/2]

static bool Bovender.Versioning.SemanticVersion.operator>= ( SemanticVersion  higher,
SemanticVersion  lower 
)
inlinestatic

◆ operator>=() [2/2]

static bool Bovender.Versioning.SemanticVersion.operator>= ( SemanticVersion  higher,
SemanticVersion  lower 
)
inlinestatic

◆ ParseString() [1/2]

void Bovender.Versioning.SemanticVersion.ParseString ( string  s)
inlineprotected

Parses a string that complies with semantic versioning, V. 2.

Parameters
sSemantic version string.

◆ ParseString() [2/2]

void Bovender.Versioning.SemanticVersion.ParseString ( string  s)
inlineprotected

Parses a string that complies with semantic versioning, V. 2.

Parameters
sSemantic version string.

◆ ToString() [1/2]

override string Bovender.Versioning.SemanticVersion.ToString ( )
inline

Returns the full version string.

Returns

◆ ToString() [2/2]

override string Bovender.Versioning.SemanticVersion.ToString ( )
inline

Returns the full version string.

Returns

Property Documentation

◆ Build

string Bovender.Versioning.SemanticVersion.Build
getset

◆ Major

int Bovender.Versioning.SemanticVersion.Major
getset

◆ Minor

int Bovender.Versioning.SemanticVersion.Minor
getset

◆ Patch

int Bovender.Versioning.SemanticVersion.Patch
getset

◆ PreMajor

int Bovender.Versioning.SemanticVersion.PreMajor
getset

◆ PreMinor

int Bovender.Versioning.SemanticVersion.PreMinor
getset

◆ PrePatch

int Bovender.Versioning.SemanticVersion.PrePatch
getset

◆ Prerelease

Prerelease Bovender.Versioning.SemanticVersion.Prerelease
getset

The documentation for this class was generated from the following file: