[Serializable]
[CLSCompliant(true)]
public sealed class VersionRange
Namespace: McSherry.SemanticVersioning.Ranges
Minimum Version: 1.1.0
Represents a range of acceptable versions. This class cannot be inherited.
- VersionRange(String)
Creates a version range from a string representing the range.
- MemoizationAgent
The cache used to memoize the results of VersionRange satisfaction methods. - SynchronizationObject
The object used in synchronising accesses to the MemoizationAgent.
- SatisfiedBy(SemanticVersion)
Determines whether the current version range is satisfied by a specified SemanticVersion. - SatisfiedBy(SemanticVersion[])
Determines whether the current range is satisfied by all specified SemanticVersion instances.
- Parse(String)
Parses a version range from a string. - TryParse(String, out VersionRange)
Attempts to parse a version range from a string.
A version range specifies a set of semantic versions that are acceptable, and is used to check that a given semantic version fits within this set.
Version ranges use the node-semver
syntax for ranges.
Specifically, ranges are based on the specification as it was
written for the v6.0.0
release of node-semver
.
The full basic and advanced range syntaxes are supported, but
there are minor differences in how 'X-ranges' are handled. Unlike
with node-semver
, this class will reject ranges where the wildcard
(x
, X
, or *
character) is followed by another version component
or by pre-release identifiers or metadata. As node-semver
appears
to ignore anything that follows a wildcard, this has no real impact
on functionality.
In addition, for backwards compatibility, an empty version range
will be considered invalid. node-semver
treats this as equivalent
to *
.