Struct SemanticVersion
A Semantic Versioning structure.
Namespace: GDX.Developer
Syntax
public readonly struct SemanticVersion
Remarks
Constructors
| Improve this Doc View SourceSemanticVersion(String)
Create a SemanticVersion based on a formatted System.String.
Declaration
public SemanticVersion(string version)
Parameters
Type | Name | Description |
---|---|---|
System.String | version | A formatted version semantic version string (2020.1.0). |
Fields
| Improve this Doc View SourceMajor
Major Version.
Declaration
public readonly int Major
Field Value
Type | Description |
---|---|
System.Int32 |
Remarks
Is incremented when you make incompatible API changes.
Minor
Minor Version.
Declaration
public readonly int Minor
Field Value
Type | Description |
---|---|
System.Int32 |
Remarks
Is incremented when you add functionality in a backwards-compatible manner.
Patch
Patch Version
Declaration
public readonly int Patch
Field Value
Type | Description |
---|---|
System.Int32 |
Remarks
Is incremented when you make backwards-compatible fixes.
Methods
| Improve this Doc View SourceEquals(Object)
Does the obj
equal this SemanticVersion.
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | An System.Object to compare against. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the result of an EQUALITY operation. |
Overrides
GetHashCode()
Get the hash code of the SemanticVersion.
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A System.Int32 value. |
Overrides
Operators
| Improve this Doc View SourceEquality(SemanticVersion, SemanticVersion)
Determine if SemanticVersion is equal to another SemanticVersion.
Declaration
public static bool operator ==(SemanticVersion lhs, SemanticVersion rhs)
Parameters
Type | Name | Description |
---|---|---|
SemanticVersion | lhs | Left-hand side SemanticVersion. |
SemanticVersion | rhs | Right-hand side SemanticVersion. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the result of a EQUALITY operation on two SemanticVersion values. |
GreaterThan(SemanticVersion, SemanticVersion)
Determine if SemanticVersion is greater than another SemanticVersion.
Declaration
public static bool operator>(SemanticVersion lhs, SemanticVersion rhs)
Parameters
Type | Name | Description |
---|---|---|
SemanticVersion | lhs | Left-hand side SemanticVersion. |
SemanticVersion | rhs | Right-hand side SemanticVersion. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the result of a GREATER THAN operation on two SemanticVersion values. |
GreaterThanOrEqual(SemanticVersion, SemanticVersion)
Determine if SemanticVersion is greater than or equal to another SemanticVersion.
Declaration
public static bool operator >=(SemanticVersion lhs, SemanticVersion rhs)
Parameters
Type | Name | Description |
---|---|---|
SemanticVersion | lhs | Left-hand side SemanticVersion. |
SemanticVersion | rhs | Right-hand side SemanticVersion. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the result of a GREATER THAN OR EQUAL operation on two SemanticVersion values. |
Inequality(SemanticVersion, SemanticVersion)
Determine if SemanticVersion does not equal than another SemanticVersion.
Declaration
public static bool operator !=(SemanticVersion lhs, SemanticVersion rhs)
Parameters
Type | Name | Description |
---|---|---|
SemanticVersion | lhs | Left-hand side SemanticVersion. |
SemanticVersion | rhs | Right-hand side SemanticVersion. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the result of a NOT EQUAL operation on two SemanticVersion values. |
LessThan(SemanticVersion, SemanticVersion)
Determine if SemanticVersion is less than another SemanticVersion.
Declaration
public static bool operator <(SemanticVersion lhs, SemanticVersion rhs)
Parameters
Type | Name | Description |
---|---|---|
SemanticVersion | lhs | Left-hand side SemanticVersion. |
SemanticVersion | rhs | Right-hand side SemanticVersion. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the result of a LESS THAN operation on two SemanticVersion values. |
LessThanOrEqual(SemanticVersion, SemanticVersion)
Determine if SemanticVersion is less than or equal to another SemanticVersion.
Declaration
public static bool operator <=(SemanticVersion lhs, SemanticVersion rhs)
Parameters
Type | Name | Description |
---|---|---|
SemanticVersion | lhs | Left-hand side SemanticVersion. |
SemanticVersion | rhs | Right-hand side SemanticVersion. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the result of a LESS THAN OR EQUAL operation on two SemanticVersion values. |