Method | Description | |
---|---|---|
Parse ( string value ) : |
Parses a SemVer string using strict SemVer rules.
|
|
StrictSemanticVersion ( |
Creates a SemanticVersion from an existing SemanticVersion
|
|
StrictSemanticVersion ( int major, int minor, int patch ) : System |
Creates a SemanticVersion X.Y.Z
|
|
StrictSemanticVersion ( int major, int minor, int patch, IEnumerable |
Creates a NuGetVersion X.Y.Z-alpha.1.2#build01
|
|
StrictSemanticVersion ( int major, int minor, int patch, string releaseLabel ) : System |
Creates a NuGetVersion X.Y.Z-alpha
|
|
StrictSemanticVersion ( int major, int minor, int patch, string releaseLabel, string metadata ) : System |
Creates a NuGetVersion X.Y.Z-alpha#build01
|
|
TryParse ( string value, |
Parse a version string
|
Method | Description | |
---|---|---|
StrictSemanticVersion ( System.Version version, IEnumerable |
||
StrictSemanticVersion ( System.Version version, string releaseLabel = null, string metadata = null ) : System | ||
StrictSemanticVersion ( int major, int minor, int patch, int revision, IEnumerable |
||
StrictSemanticVersion ( int major, int minor, int patch, int revision, string releaseLabel, string metadata ) : System |
Method | Description | |
---|---|---|
IsLetterOrDigitOrDash ( char c ) : bool | ||
IsValid ( string s, bool allowLeadingZeros ) : bool | ||
IsValidPart ( char chars, bool allowLeadingZeros ) : bool | ||
IsValidPart ( string s, bool allowLeadingZeros ) : bool | ||
NormalizeVersionValue ( System.Version version ) : System.Version | ||
ParseReleaseLabels ( string releaseLabels ) : IEnumerable |
||
ParseSections ( string value ) : Tuple |
Parse the version string into version/release/build The goal of this code is to take the most direct and optimized path to parsing and validating a semver. Regex would be much cleaner, but due to the number of versions created in NuGet Regex is too slow.
|
public static Parse ( string value ) : |
||
value | string | |
return |
public StrictSemanticVersion ( |
||
version | ||
return | System |
protected StrictSemanticVersion ( System.Version version, IEnumerable |
||
version | System.Version | |
releaseLabels | IEnumerable |
|
metadata | string | |
preserveMissingComponents | bool | |
return | System |
protected StrictSemanticVersion ( System.Version version, string releaseLabel = null, string metadata = null ) : System | ||
version | System.Version | |
releaseLabel | string | |
metadata | string | |
return | System |
public StrictSemanticVersion ( int major, int minor, int patch ) : System | ||
major | int | X.y.z |
minor | int | x.Y.z |
patch | int | x.y.Z |
return | System |
public StrictSemanticVersion ( int major, int minor, int patch, IEnumerable |
||
major | int | X.y.z |
minor | int | x.Y.z |
patch | int | x.y.Z |
releaseLabels | IEnumerable |
Release labels that have been split by the dot separator |
metadata | string | Build metadata |
return | System |
protected StrictSemanticVersion ( int major, int minor, int patch, int revision, IEnumerable |
||
major | int | |
minor | int | |
patch | int | |
revision | int | |
releaseLabels | IEnumerable |
|
metadata | string | |
return | System |
protected StrictSemanticVersion ( int major, int minor, int patch, int revision, string releaseLabel, string metadata ) : System | ||
major | int | |
minor | int | |
patch | int | |
revision | int | |
releaseLabel | string | |
metadata | string | |
return | System |
public StrictSemanticVersion ( int major, int minor, int patch, string releaseLabel ) : System | ||
major | int | X.y.z |
minor | int | x.Y.z |
patch | int | x.y.Z |
releaseLabel | string | Prerelease label |
return | System |
public StrictSemanticVersion ( int major, int minor, int patch, string releaseLabel, string metadata ) : System | ||
major | int | X.y.z |
minor | int | x.Y.z |
patch | int | x.y.Z |
releaseLabel | string | Prerelease label |
metadata | string | Build metadata |
return | System |
public static TryParse ( string value, |
||
value | string | |
version | ||
return | bool |