Summary
Represents the pre-release label and optional numeric identifier of
a semantic version (e.g.
beta.1).
- Namespace
- GitVersion
- Interfaces
-
-
IComparable
<Semantic Version Pre Release Tag> -
IEquatable
<Semantic Version Pre Release Tag>
-
IComparable
- Base Types
-
- IFormattable
graph BT Type-->Base0["IFormattable"]
Type-.->Interface0["IComparable<SemanticVersionPreReleaseTag>"]
Type-.->Interface1["IEquatable<SemanticVersionPreReleaseTag>"]
Type["SemanticVersionPreReleaseTag"] class Type type-node
Syntax
public sealed class SemanticVersionPreReleaseTag : IFormattable,
IComparable<SemanticVersionPreReleaseTag>, IEquatable<SemanticVersionPreReleaseTag>
Constructors
| Name | Summary |
|---|---|
|
Semantic |
Initializes an empty pre-release tag. |
|
Semantic |
Initializes a new pre-release tag as a copy of preReleaseTag. |
|
Semantic |
Initializes a new pre-release tag with the given name, number, and promotion flag. |
Fields
| Name | Constant Value | Summary |
|---|---|---|
| Empty |
An empty pre-release tag with no name and no number.
static
|
Properties
| Name | Value | Summary |
|---|---|---|
| Name | string |
Gets or initializes the pre-release label (e.g.
beta).
|
| Number | long? |
Gets or initializes the numeric identifier appended
after the label (e.g. the
1 in
beta.1).
|
|
Promote |
bool |
Gets or initializes a value indicating whether the tag
should be promoted even when
Name
is empty.
|
Methods
| Name | Value | Summary |
|---|---|---|
|
CompareTo |
int |
Compares this tag to
other by name
and number.
|
|
Equals |
bool | |
|
Equals |
bool |
Returns
true when this tag is
equal to
other by name
and number.
|
|
GetHashCode |
int |
Returns a hash code based on the tag name and number.
|
|
HasTag |
bool |
Returns
true when this tag has a
non-empty name or a number with the promotion flag set.
|
|
Parse |
Semantic |
Parses a pre-release tag string, returning
Empty
when the input is null or empty.
static
|
|
ToString |
string |
Returns the default SemVer 2.0 formatted tag string
(e.g.
beta.1).
|
|
ToString |
string |
Default formats:
t - SemVer 2.0 formatted tag [beta.1] |
|
ToString |
string |
Returns a string representation using the given format
specifier.
|
Operators
| Name | Value | Summary |
|---|---|---|
|
implicit operator
|
Semantic |
|
|
implicit operator string |
string | |
|
operator != |
bool | |
|
operator
|
bool | |
|
operator
|
bool | |
|
operator == |
bool | |
|
operator > |
bool | |
|
operator > |
bool |
Extension Methods
| Name | Value | Summary |
|---|---|---|
|
NotNull |
T |
Throws
ArgumentNullException when
value is
null; otherwise returns the
value.
From
CommonExtensions
|