Specifies parts of a semantic version. This is used in PackageSpecifier to represent the part of a SemanticVersion to search for. E.g. the VersionSpecifier "9.0" may match the semantic version "9.0.4+abcdef" and also "9.1.x" if MatchBehavior is set to "Compatible".
More...
Inherits IComparable.
|
| VersionSpecifier (int? major, int? minor, int? patch, string prerelease, string buildMetadata, VersionMatchBehavior matchBehavior) |
| Specifies parts of a semantic version. Unset parameters will be treated as 'any'.
|
|
| VersionSpecifier (SemanticVersion ver, VersionMatchBehavior matchBehavior) |
| Creates a VersionSpecifier from a SemanticVersion.
|
|
override string | ToString () |
| Converts this value to a string. This string can be parsed by Parse(string) and TryParse(string, out VersionSpecifier).
|
|
string | ToString (int fieldCount) |
| Prints the string in version format. It should be parsable from the same string. More...
|
|
bool | IsCompatible (SemanticVersion actualVersion) |
| Compatibility comparison that returns true if the given version can fulfil this specification. I.e. 'actualVersion' can replace 'this' in every respect. More...
|
|
override int | GetHashCode () |
| Gets the hash code of this value.
|
|
override bool | Equals (object obj) |
| Compares this VersionSpecifier with another object.
|
|
int | CompareTo (object obj) |
| Returns -1 if obj is greater than this version, 0 if they are the same, and 1 if this is greater than obj More...
|
|
|
static readonly VersionSpecifier | Any = new VersionSpecifier(null, null, null, null, null, VersionMatchBehavior.Exact | VersionMatchBehavior.AnyPrerelease) |
| The VersionSpecifier that will match any version. VersionSpecifier.Any.IsCompatible always returns true.
|
|
static readonly VersionSpecifier | AnyRelease = new VersionSpecifier(null, null, null, null, null, VersionMatchBehavior.Exact) |
| The VersionSpecifier that will match any version. VersionSpecifier.Any.IsCompatible always returns true.
|
|
Specifies parts of a semantic version. This is used in PackageSpecifier to represent the part of a SemanticVersion to search for. E.g. the VersionSpecifier "9.0" may match the semantic version "9.0.4+abcdef" and also "9.1.x" if MatchBehavior is set to "Compatible".
◆ CompareTo()
int OpenTap.Package.VersionSpecifier.CompareTo |
( |
object |
obj | ) |
|
|
inline |
Returns -1 if obj is greater than this version, 0 if they are the same, and 1 if this is greater than obj
- Parameters
-
- Returns
◆ IsCompatible()
bool OpenTap.Package.VersionSpecifier.IsCompatible |
( |
SemanticVersion |
actualVersion | ) |
|
|
inline |
Compatibility comparison that returns true if the given version can fulfil this specification. I.e. 'actualVersion' can replace 'this' in every respect.
- Parameters
-
- Returns
◆ Parse()
static VersionSpecifier OpenTap.Package.VersionSpecifier.Parse |
( |
string |
version | ) |
|
|
inlinestatic |
Parses a string as a VersionSpecifier.
- Exceptions
-
FormatException | The string is not a valid version specifier. |
◆ ToString()
string OpenTap.Package.VersionSpecifier.ToString |
( |
int |
fieldCount | ) |
|
|
inline |
Prints the string in version format. It should be parsable from the same string.
- Parameters
-
fieldCount | Number of values to return. Must be 1, 2, 4 or 5. |
- Exceptions
-
ArgumentOutOfRangeException | |
- Returns