SemanticVersion Class

Namespace
GitVersion
Interfaces
Base Types
  • IFormattable
graph BT Type-->Base0["IFormattable"] Type-.->Interface0["IComparable<SemanticVersion>"] Type-.->Interface1["IEquatable<SemanticVersion>"] Type["SemanticVersion"] class Type type-node

Syntax

public class SemanticVersion : IFormattable, IComparable<SemanticVersion>, 
    IEquatable<SemanticVersion>

Constructors

Fields

Name Constant Value Summary
BuildMetaData
Major
Minor
Patch
PreReleaseTag

Methods

Name Value Summary
CompareTo(SemanticVersion) int
CompareTo(SemanticVersion, bool) int
Equals(object) bool
Equals(SemanticVersion) bool
GetHashCode() int
IncrementVersion(VersionField) SemanticVersion
IsEmpty() bool
Parse(string, string) SemanticVersion
static
ToString() string
ToString(string) string
ToString(string, IFormatProvider?) string

s - Default SemVer [1.2.3-beta.4]

f - Full SemVer [1.2.3-beta.4+5]

i - Informational SemVer [1.2.3-beta.4+5.Branch.main.BranchType.main.Sha.000000]

j - Just the SemVer part [1.2.3]

t - SemVer with the tag [1.2.3-beta.4]

l - Legacy SemVer tag for systems which do not support SemVer 2.0 properly [1.2.3-beta4]

lp - Legacy SemVer tag for systems which do not support SemVer 2.0 properly (padded) [1.2.3-beta0004]

TryParse(string, string, SemanticVersion) bool
static

Operators

Name Value Summary
operator !=(SemanticVersion, SemanticVersion) bool
operator <(SemanticVersion, SemanticVersion) bool
operator <=(SemanticVersion, SemanticVersion) bool
operator ==(SemanticVersion, SemanticVersion) bool
operator >(SemanticVersion, SemanticVersion) bool
operator >=(SemanticVersion, SemanticVersion) bool

Extension Methods

GitHub