Skip to content

Class VersionRange

Namespace: Apogee.Content.Packages
Assembly: Apogee.Content.dll

Which versions a dependency or a game accepts: comparators separated by spaces or commas that must all hold. >=1.2, <=, >, <, =1.2 (or just 1.2), ^1.2.3 (at least that, below the next version of its first non-zero part: <2.0.0, and ^0.2.3 is <0.3.0), ~1.2.3 (below the next minor: <1.3.0), and * (any). Empty means any.

public sealed class VersionRange

Inheritance

object ← VersionRange

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

Any

Any version.

public static VersionRange Any { get; }

Property Value

VersionRange

Text

The range as it was written.

public string Text { get; }

Property Value

string

Methods

Matches(PackageVersion)

public bool Matches(PackageVersion version)

Parameters

version PackageVersion

Returns

bool

Parse(string)

public static VersionRange Parse(string text)

Parameters

text string

Returns

VersionRange

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryParse(string, out VersionRange?, out string?)

public static bool TryParse(string text, out VersionRange? range, out string? error)

Parameters

text string

range VersionRange?

error string?

Returns

bool