Struct ModuleVersion

Assembly: redb.Tsak.Core.dll

Date-time based module version: yyyy.MM.dd.HHmm.
Chronological comparison: newer date-time = higher version.

public readonly struct ModuleVersion : IComparable<ModuleVersion>, IEquatable<ModuleVersion>

Implements

Properties

IsValid

Whether this represents a valid parsed version.

public bool IsValid { get; }

Timestamp

Parsed date-time of the version.

public DateTime Timestamp { get; }

Value

Original version string.

public string Value { get; }

Methods

CompareTo(ModuleVersion)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follow...

public int CompareTo(ModuleVersion other)

Equals(ModuleVersion)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ModuleVersion other)

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

IsNewer(string?, string?)

Returns true if newer is a higher version than older.

public static bool IsNewer(string? newer, string? older)

Now()

Creates a version from the current UTC time.

public static ModuleVersion Now()

Parse(string)

Parses a version string in yyyy.MM.dd.HHmm format.

public static ModuleVersion Parse(string version)

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

TryParse(string?, out ModuleVersion)

Tries to parse a version string.

public static bool TryParse(string? version, out ModuleVersion result)