Interface IVersion
- Namespace
- Hi3Helper.Plugin.Core.Management
- Assembly
- Hi3Helper.Plugin.Core.dll
Represents a version with major, minor, build, and revision components. Provides methods for comparison, conversion, and string representation.
public interface IVersion : IEquatable<IVersion>
- Inherited Members
Remarks
This interface is designed for use in plugin management scenarios where versioning is required. It supports comparison operators and conversion to the standard Version type.
Methods
AsSpan()
Returns the version components as a read-only span of integers.
ReadOnlySpan<int> AsSpan()
Returns
- ReadOnlySpan<int>
A ReadOnlySpan<T> containing major, minor, build, and revision.
ToString()
Returns the string representation of the version.
string? ToString()
Returns
- string
A string representing the version, or
nullif not available.
ToVersion()
Converts this instance to a Version object.
Version ToVersion()
Returns
get_Build()
Gets the build component of the version.
int get_Build()
Returns
- int
The build version number.
get_Major()
Gets the major component of the version.
int get_Major()
Returns
- int
The major version number.
get_Minor()
Gets the minor component of the version.
int get_Minor()
Returns
- int
The minor version number.
get_Revision()
Gets the revision component of the version.
int get_Revision()
Returns
- int
The revision version number.
Operators
operator >(IVersion?, IVersion?)
Determines whether one IVersion is greater than another.
public static bool operator >(IVersion? left, IVersion? right)
Parameters
Returns
- bool
trueifleftis greater thanright; otherwise,false.
operator <(IVersion?, IVersion?)
Determines whether one IVersion is less than another.
public static bool operator <(IVersion? left, IVersion? right)
Parameters
Returns
- bool
trueifleftis less thanright; otherwise,false.