Show / Hide Table of Contents

Struct ApiVersion

Represents the API version.

Implements
System.IEquatable<ApiVersion>
System.IComparable<ApiVersion>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: QBittorrent.Client
Assembly: QBittorrent.Client.dll
Syntax
public readonly struct ApiVersion : IEquatable<ApiVersion>, IComparable<ApiVersion>

Constructors

| Improve this Doc View Source

ApiVersion(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 Source

Major

The major part of the version.

Declaration
public readonly byte Major
Field Value
Type Description
System.Byte
| Improve this Doc View Source

Minor

The minor part of the version.

Declaration
public readonly byte Minor
Field Value
Type Description
System.Byte
| Improve this Doc View Source

Release

The release part of the version.

Declaration
public readonly byte Release
Field Value
Type Description
System.Byte

Methods

| Improve this Doc View Source

CompareTo(ApiVersion)

Declaration
public readonly int CompareTo(ApiVersion other)
Parameters
Type Name Description
ApiVersion other
Returns
Type Description
System.Int32
| Improve this Doc View Source

Equals(ApiVersion)

Declaration
public readonly bool Equals(ApiVersion other)
Parameters
Type Name Description
ApiVersion other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Object)

Declaration
public override readonly bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Declaration
public override readonly int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

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
| Improve this Doc View Source

ToString()

Declaration
public override readonly string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Operators

| Improve this Doc View Source

Equality(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

Implements

System.IEquatable<T>
System.IComparable<T>

See Also

System.IEquatable<T>
System.IComparable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018 Pavel Fedarovich