Struct ApiVersion
Represents the API version.
Inherited Members
Namespace: QBittorrent.Client
Assembly: QBittorrent.Client.dll
Syntax
public readonly struct ApiVersion : IEquatable<ApiVersion>, IComparable<ApiVersion>
Constructors
| Improve this Doc View SourceApiVersion(Byte, Byte, Byte)
Initializes a new instance of the ApiVersion struct.
Declaration
public ApiVersion(byte major, byte minor = 0, byte release = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | major | The major part of the version. |
System.Byte | minor | The minor part of the version. |
System.Byte | release | The release part of the version. |
Fields
| Improve this Doc View SourceMajor
The major part of the version.
Declaration
public readonly byte Major
Field Value
Type | Description |
---|---|
System.Byte |
Minor
The minor part of the version.
Declaration
public readonly byte Minor
Field Value
Type | Description |
---|---|
System.Byte |
Release
The release part of the version.
Declaration
public readonly byte Release
Field Value
Type | Description |
---|---|
System.Byte |
Methods
| Improve this Doc View SourceCompareTo(ApiVersion)
Declaration
public readonly int CompareTo(ApiVersion other)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | other |
Returns
Type | Description |
---|---|
System.Int32 |
Equals(ApiVersion)
Declaration
public readonly bool Equals(ApiVersion other)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Parse(String)
Parses the specified version string.
Declaration
public static ApiVersion Parse(string versionString)
Parameters
Type | Name | Description |
---|---|---|
System.String | versionString | The version string in format major[.minor[.release]] |
Returns
Type | Description |
---|---|
ApiVersion |
ToString()
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Operators
| Improve this Doc View SourceEquality(ApiVersion, ApiVersion)
Implements the operator ==.
Declaration
public static bool operator ==(ApiVersion left, ApiVersion right)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | left | The left. |
ApiVersion | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
GreaterThan(ApiVersion, ApiVersion)
Implements the operator >.
Declaration
public static bool operator>(ApiVersion left, ApiVersion right)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | left | The left. |
ApiVersion | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
GreaterThanOrEqual(ApiVersion, ApiVersion)
Implements the operator >=.
Declaration
public static bool operator >=(ApiVersion left, ApiVersion right)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | left | The left. |
ApiVersion | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
Implicit(ApiVersion to Version)
Performs an implicit conversion from ApiVersion to System.Version.
Declaration
public static implicit operator Version(ApiVersion apiVersion)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | apiVersion | The API version. |
Returns
Type | Description |
---|---|
System.Version | The result of the conversion. |
Inequality(ApiVersion, ApiVersion)
Implements the operator !=.
Declaration
public static bool operator !=(ApiVersion left, ApiVersion right)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | left | The left. |
ApiVersion | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
LessThan(ApiVersion, ApiVersion)
Implements the operator <.
Declaration
public static bool operator <(ApiVersion left, ApiVersion right)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | left | The left. |
ApiVersion | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
LessThanOrEqual(ApiVersion, ApiVersion)
Implements the operator <=.
Declaration
public static bool operator <=(ApiVersion left, ApiVersion right)
Parameters
Type | Name | Description |
---|---|---|
ApiVersion | left | The left. |
ApiVersion | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |