bovender framework
C# framework that implements MVVM and more
Bovender.Versioning.SemanticVersion Class Reference

Class that handles semantic versioning. More...

Inheritance diagram for Bovender.Versioning.SemanticVersion:

Public Member Functions

 SemanticVersion (string version)
 Instantiates the class from a given version string. More...
 
 SemanticVersion (Assembly assembly)
 Creates an instance with the current version information, which must be contained in a file called "VERSION" that is built as an embedded resource. More...
 
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 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. 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.

Definition at line 44 of file SemanticVersion.cs.

Constructor & Destructor Documentation

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

Instantiates the class from a given version string.

Parameters
versionString that complies with semantic versioning rules.

Definition at line 73 of file SemanticVersion.cs.

Bovender.Versioning.SemanticVersion.SemanticVersion ( Assembly  assembly)
inline

Creates an instance 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

Definition at line 87 of file SemanticVersion.cs.

Member Function Documentation

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

Parses a string that complies with semantic versioning, V.

2.

Parameters
sSemantic version string.

Definition at line 291 of file SemanticVersion.cs.

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

Returns the full version string.

Returns

Definition at line 271 of file SemanticVersion.cs.


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