ModVersion
A struct in TavernLib, TavernLib.Backend.Mods.
A mod version, exactly MAJOR.MINOR.PATCH in ASCII digits with no pre-release or build parts, compared by major, minor, then patch.
- Listed in TavernLib.Backend.Mods
- Inherits or implements IComparable<ModVersion>
- Derived types
ModVersion - Attributes
IsReadOnly - Documented in Versions and parity
Constructors
| Member | What it is |
|---|---|
ModVersion(int major, int minor, int patch) | Creates a version from major, minor and patch numbers. |
Properties
| Member | What it is |
|---|---|
int Major { get; } | The first number. |
int Minor { get; } | The second number. |
int Patch { get; } | The third number. |
Methods
| Member | What it is |
|---|---|
int CompareTo(ModVersion other) | Compares by major, then minor, then patch. |
static bool op_GreaterThan(ModVersion a, ModVersion b) | Compares two versions. |
static bool op_GreaterThanOrEqual(ModVersion a, ModVersion b) | Compares two versions. |
static bool op_LessThan(ModVersion a, ModVersion b) | Compares two versions. |
static bool op_LessThanOrEqual(ModVersion a, ModVersion b) | Compares two versions. |
static ModVersion Parse(string v) | Parses three dot-separated digit runs after trimming spaces. Throws ModManagerException for anything else. |
override string ToString() | The version as major.minor.patch. |
static bool TryParse(string v, out ModVersion result) | The same as Parse, returning false instead of throwing. |
1 private and internal method
Used in
Members of other types that take, return or hold a ModVersion: