Table of Contents

Struct AmqpTimestamp

Namespace
RabbitMQ.Client
Assembly
RabbitMQ.Client.dll

Structure holding an AMQP timestamp, a posix 64-bit time_t.

public readonly struct AmqpTimestamp : IEquatable<AmqpTimestamp>
Implements
Inherited Members

Remarks

When converting between an AmqpTimestamp and a System.DateTime, be aware of the effect of your local timezone. In particular, different versions of the .NET framework assume different defaults.

We have chosen a signed 64-bit time_t here, since the AMQP specification through versions 0-9 is silent on whether timestamps are signed or unsigned.

Constructors

AmqpTimestamp(long)

Construct an AmqpTimestamp.

public AmqpTimestamp(long unixTime)

Parameters

unixTime long

Unix time in seconds.

Fields

UnixTime

Unix time in seconds.

public readonly long UnixTime

Field Value

long

Methods

Equals(AmqpTimestamp)

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

public bool Equals(AmqpTimestamp other)

Parameters

other AmqpTimestamp

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Provides a debugger-friendly display.

public override string ToString()

Returns

string

Operators

operator ==(AmqpTimestamp, AmqpTimestamp)

public static bool operator ==(AmqpTimestamp left, AmqpTimestamp right)

Parameters

left AmqpTimestamp
right AmqpTimestamp

Returns

bool

operator !=(AmqpTimestamp, AmqpTimestamp)

public static bool operator !=(AmqpTimestamp left, AmqpTimestamp right)

Parameters

left AmqpTimestamp
right AmqpTimestamp

Returns

bool