Summary
Represents a resolved base version consisting of an operand (the discovered version) and an optional operator (the increment to apply).
- Assembly
- GitVersion
.Core .dll - Namespace
- GitVersion
.VersionCalculation - Interfaces
-
- IBaseVersion
- I
Base Version Increment - IEquatable
<BaseVersion>
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IBaseVersion"]
click Interface0 "/api/GitVersion.VersionCalculation/IBaseVersion"
Type-.->Interface1["IBaseVersionIncrement"]
click Interface1 "/api/GitVersion.VersionCalculation/IBaseVersionIncrement"
Type-.->Interface2["IEquatable<BaseVersion>"]
Type["BaseVersion"]
class Type type-node
Syntax
public sealed class BaseVersion : IBaseVersion, IBaseVersionIncrement, IEquatable<BaseVersion>
Attributes
| Type | Description |
|---|---|
| Nullable |
|
| NullableAttribute |
Constructors
| Name | Summary |
|---|---|
| BaseVersion | Initializes an empty base version. |
| BaseVersion | Represents a resolved base version consisting of an operand (the discovered version) and an optional operator (the increment to apply). |
| BaseVersion | Initializes a base version from a source description, semantic version, and optional source commit. |
Properties
| Name | Value | Summary |
|---|---|---|
| BaseVersionSource | ICommit |
Gets the commit that is the source of this base version.
|
| Increment | VersionField |
Gets the version field that will be incremented, or
None when no increment is needed. |
| SemanticVersion | SemanticVersion |
Gets the base semantic version before any increment is applied.
|
| ShouldIncrement | bool |
Gets a value indicating whether this base version has a pending increment operator.
|
| Source | string |
Gets the human-readable description of the source that produced this base version.
|
Methods
| Name | Value | Summary |
|---|---|---|
| Deconstruct |
void | |
| Equals |
bool | |
| Equals |
bool | |
| get_Operand |
BaseVersionOperand | |
| get_Operator |
BaseVersionOperator | |
| GetHashCode |
int | |
| Get |
SemanticVersion |
Returns the semantic version after applying the operator increment, or the base version when no increment is needed.
|
| set_Operand |
||
| set_Operator |
||
| ToString |
string |
Returns a human-readable description of this base version including source, version, increment, and commit anchor.
|
Operators
| Name | Value | Summary |
|---|---|---|
| operator != |
bool | |
| operator == |
bool |
Extension Methods
| Name | Value | Summary |
|---|---|---|
| NotNull |
T |
Throws
System.ArgumentNullException when value is null; otherwise returns the value.From CommonExtensions
|