Show / Hide Table of Contents

Class SemVersionRangeOptions

Determines the parsing options and allowed styles of range and version strings passed to the Parse(String, SemVersionRangeOptions, Int32) and TryParse(String, SemVersionRangeOptions, out SemVersionRange, Int32) methods. These styles only affect which strings are accepted when parsing. The constructed ranges and version numbers are valid semantic version ranges without any of the optional features in the original string.

Most options only allow additional version styles. However, the IncludeAllPrerelease option modifies how version ranges are interpreted. With this option, all prerelease versions within the range bounds will be considered to be in the range. Without this option, only prerelease versions where one comparison with the same major, minor, and patch versions is prerelease will satisfy the range. For more information, see the range expressions documentation.

This enumeration supports a bitwise combination of its member values (e.g. SemVersionRangeOptions.OptionalPatch | SemVersionRangeOptions.AllowV).

Inheritance
System.Object
SemVersionRangeOptions
Namespace: Semver
Assembly: Semver.dll
Syntax
public sealed class SemVersionRangeOptions : Enum

Fields

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 SemVersionRangeOptions AllowLeadingZeros
Field Value
Type Description
SemVersionRangeOptions

AllowLowerV

Allow a leading lowercase "v" on versions.
Declaration
public const SemVersionRangeOptions AllowLowerV
Field Value
Type Description
SemVersionRangeOptions

AllowMetadata

Allow version numbers with build metadata in version range expressions. The metadata will be removed/ignored for the definition of the version range.
Declaration
public const SemVersionRangeOptions AllowMetadata
Field Value
Type Description
SemVersionRangeOptions

AllowUpperV

Allow a leading uppercase "V" on versions.
Declaration
public const SemVersionRangeOptions AllowUpperV
Field Value
Type Description
SemVersionRangeOptions

AllowV

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

IncludeAllPrerelease

Include all prerelease versions in the range rather than just prerelease versions matching a prerelease identifier in the range.
Declaration
public const SemVersionRangeOptions IncludeAllPrerelease
Field Value
Type Description
SemVersionRangeOptions

Loose

Accept any version string format supported.

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

Declaration
public const SemVersionRangeOptions Loose
Field Value
Type Description
SemVersionRangeOptions

OptionalMinorPatch

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

OptionalPatch

Patch version number is optional on versions.
Declaration
public const SemVersionRangeOptions OptionalPatch
Field Value
Type Description
SemVersionRangeOptions

Strict

Accept versions strictly conforming to the SemVer 2.0 spec without metadata.
Declaration
public const SemVersionRangeOptions Strict
Field Value
Type Description
SemVersionRangeOptions

value__

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