Class SemVersionStyles
Determines the styles that are allowed in version strings passed to the
Parse(String, SemVersionStyles, Int32) and
TryParse(String, SemVersionStyles, out SemVersion, Int32)
methods. These styles only affect which strings are accepted when parsing. The
constructed version numbers are valid semantic versions without any of the
optional features in the original string.
This enumeration supports a bitwise combination of its member values (e.g.
SemVersionStyles.AllowWhitespace | SemVersionStyles.AllowV).
Inheritance
System.Object
SemVersionStyles
Assembly: Semver.dll
Syntax
public sealed class SemVersionStyles : Enum
Fields
AllowLeadingWhitespace
Allow leading whitespace. When combined with leading "v", the whitespace
must come before the "v".
Declaration
public const SemVersionStyles AllowLeadingWhitespace
Field Value
AllowLeadingZeros
Allow leading zeros on major, minor, patch, and prerelease version numbers.
Leading zeros will be removed from the constructed version number.
Declaration
public const SemVersionStyles AllowLeadingZeros
Field Value
AllowLowerV
Allow a leading lowercase "v".
Declaration
public const SemVersionStyles AllowLowerV
Field Value
AllowTrailingWhitespace
Allow trailing whitespace.
Declaration
public const SemVersionStyles AllowTrailingWhitespace
Field Value
AllowUpperV
Allow a leading uppercase "V".
Declaration
public const SemVersionStyles AllowUpperV
Field Value
AllowV
Allow a leading "v" or "V".
Declaration
public const SemVersionStyles AllowV
Field Value
AllowWhitespace
Allow leading and/or trailing whitespace. When combined with leading "v",
the leading whitespace must come before the "v".
Declaration
public const SemVersionStyles AllowWhitespace
Field Value
Any
Accept any version string format supported.
The formats accepted by this style will change if/when more formats are supported.
Declaration
public const SemVersionStyles Any
Field Value
OptionalMinorPatch
Minor and patch version numbers are optional.
Declaration
public const SemVersionStyles OptionalMinorPatch
Field Value
OptionalPatch
Patch version number is optional.
Declaration
public const SemVersionStyles OptionalPatch
Field Value
Strict
Accept version strings strictly conforming to the SemVer 2.0 spec.
Declaration
public const SemVersionStyles Strict
Field Value
value__
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|