Show / Hide Table of Contents

Enum 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).

Namespace: Semver
Assembly: Semver.dll
Syntax
[Flags]
public enum SemVersionStyles

Fields

Name Description
AllowLeadingWhitespace Allow leading whitespace. When combined with leading "v", the whitespace must come before the "v".
AllowLeadingZeros

Allow leading zeros on major, minor, patch, and prerelease version numbers.

Leading zeros will be removed from the constructed version number.

AllowLowerV Allow a leading lowercase "v".
AllowTrailingWhitespace Allow trailing whitespace.
AllowUpperV Allow a leading uppercase "V".
AllowV Allow a leading "v" or "V".
AllowWhitespace Allow leading and/or trailing whitespace. When combined with leading "v", the leading whitespace must come before the "v".
Any

Accept any version string format supported.

The formats accepted by this style will change if/when more formats are supported.

OptionalMinorPatch Minor and patch version numbers are optional.
OptionalPatch Patch version number is optional.
Strict Accept version strings strictly conforming to the SemVer 2.0 spec.
In This Article
Back to top Generated by DocFX