Table of Contents

Class ByteCapacity

Namespace
RabbitMQ.AMQP.Client
Assembly
RabbitMQ.AMQP.Client.dll

Class for specifying a binary size, with units

public class ByteCapacity : IEquatable<ByteCapacity>
Inheritance
ByteCapacity
Implements
Inherited Members

Constructors

ByteCapacity(long)

public ByteCapacity(long bytes)

Parameters

bytes long

Methods

B(long)

Specify an amount in bytes

public static ByteCapacity B(long bytes)

Parameters

bytes long

The size, in bytes

Returns

ByteCapacity

ByteCapacity

Equals(ByteCapacity?)

Returns a value indicating whether this instance is equal to a specified ByteCapacity value.

public bool Equals(ByteCapacity? obj)

Parameters

obj ByteCapacity

An object to compare with this instance.

Returns

bool

true if obj has the same value as this instance; otherwise, false.

Equals(object?)

Returns a value indicating whether this instance is equal to a specified ByteCapacity value.

public override bool Equals(object? obj)

Parameters

obj object

An object to compare with this instance.

Returns

bool

true if obj is an instance of ByteCapacityand equals the value of this instance; otherwise, false.

Gb(long)

Specify an amount, in gigabytes

public static ByteCapacity Gb(long gigabytes)

Parameters

gigabytes long

The size, in gigabytes

Returns

ByteCapacity

ByteCapacity

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

Kb(long)

Specify an amount, in kilobytes

public static ByteCapacity Kb(long kilobytes)

Parameters

kilobytes long

The size, in kilobytes

Returns

ByteCapacity

ByteCapacity

Mb(long)

Specify an amount, in megabytes

public static ByteCapacity Mb(long megabytes)

Parameters

megabytes long

The size, in megabytes

Returns

ByteCapacity

ByteCapacity

Parse(string)

Parse a string into a ByteCapacity

public static ByteCapacity Parse(string value)

Parameters

value string

The value, as string

Returns

ByteCapacity

ByteCapacity

Tb(long)

Specify an amount, in terabytes

public static ByteCapacity Tb(long terabytes)

Parameters

terabytes long

The size, in terabytes

Returns

ByteCapacity

ByteCapacity

Operators

explicit operator ByteCapacity(string)

Explicitly convert a string into a ByteCapacity

public static explicit operator ByteCapacity(string value)

Parameters

value string

The value, as string

Returns

ByteCapacity

ByteCapacity

implicit operator long(ByteCapacity)

Cast a ByteCapacity into a long

public static implicit operator long(ByteCapacity value)

Parameters

value ByteCapacity

The value

Returns

long

The total number of bytes.