SemanticVersion Class |
Namespace: semver.tools
The SemanticVersion type exposes the following members.
Name | Description | |
---|---|---|
![]() | SemanticVersion(Int32, Int32, Int32) |
Constructs a SemanticVersion out of a Major, Minor and Patch number.
|
![]() | SemanticVersion(Int32, Int32, Int32, Int32) |
Constructs a SemanticVersion out of a Major, Minor and Build version and a Revision.
Use this when dealing with Microsoft style versions rather than true semantic versions.
|
![]() | SemanticVersion(Int32, Int32, Int32, String) |
Constructs a SemanticVersion out of a Major, Minor and Patch number, and a pre release name.
|
Name | Description | |
---|---|---|
![]() | CompareTo(Object) |
Compares two SemanticVersions. Implements IComparable.CompareTo.
|
![]() | CompareTo(SemanticVersion) |
Compares two SemanticVersions. Implements IComparable<SemanticVersion>.CompareTo.
|
![]() | Equals(Object) |
Overrides Object.Equal. Returns true if the passed in obj is a SemanticVersion and equal (value wise) to this SemanticVersion.
(Overrides ObjectEquals(Object).) |
![]() | Equals(SemanticVersion) |
Implements IEquatable<SemanticVersion>.Equals. Returns true if the passed in SemanticVersion is equal value wise to this SemanticVersion.
|
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode |
Overrides Object.GetHashCode.
(Overrides ObjectGetHashCode.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | Parse |
Parses a string with a semantic version and returns the SemanticVersion.
Exception if the string does not contain a valid semantic version.
|
![]() ![]() | ParseOptionalVersion |
Attempts to parse a string with a semantic version.
|
![]() | ToString |
Returns the string that was originally used to create this SemanticVersion.
If no string was used, returns a string representing this SemanticVersion.
(Overrides ObjectToString.) |
![]() ![]() | TryParse |
Attempts to parse a string with a semantic version.
|
![]() ![]() | TryParseNuGet |
Parses a string using loose semantic versioning rules that allows a Microsoft or NuGet style version with
2-4 version components followed by an optional pre release name.
|
Name | Description | |
---|---|---|
![]() ![]() | Equality |
Evalutes to true if version1 equals version2.
|
![]() ![]() | GreaterThan |
Evalutes to true if version1 greater than version2.
|
![]() ![]() | GreaterThanOrEqual |
Evalutes to true if version1 greater or equal to version2.
|
![]() ![]() | Inequality |
Evalutes to true if version1 does not equal version2.
|
![]() ![]() | LessThan |
Evalutes to true if version1 smaller than version2.
|
![]() ![]() | LessThanOrEqual |
Evalutes to true if version1 smaller or equal to version2.
|