Show / Hide Table of Contents

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
Namespace: Semver
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
Type Description
SemVersionStyles

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
Type Description
SemVersionStyles

AllowLowerV

Allow a leading lowercase "v".
Declaration
public const SemVersionStyles AllowLowerV
Field Value
Type Description
SemVersionStyles

AllowTrailingWhitespace

Allow trailing whitespace.
Declaration
public const SemVersionStyles AllowTrailingWhitespace
Field Value
Type Description
SemVersionStyles

AllowUpperV

Allow a leading uppercase "V".
Declaration
public const SemVersionStyles AllowUpperV
Field Value
Type Description
SemVersionStyles

AllowV

Allow a leading "v" or "V".
Declaration
public const SemVersionStyles AllowV
Field Value
Type Description
SemVersionStyles

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
Type Description
SemVersionStyles

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
Type Description
SemVersionStyles

OptionalMinorPatch

Minor and patch version numbers are optional.
Declaration
public const SemVersionStyles OptionalMinorPatch
Field Value
Type Description
SemVersionStyles

OptionalPatch

Patch version number is optional.
Declaration
public const SemVersionStyles OptionalPatch
Field Value
Type Description
SemVersionStyles

Strict

Accept version strings strictly conforming to the SemVer 2.0 spec.
Declaration
public const SemVersionStyles Strict
Field Value
Type Description
SemVersionStyles

value__

Declaration
public int value__
Field Value
Type Description
System.Int32
In This Article
Back to top Generated by DocFX