Struct AmqpTimestamp
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
longUnix time in seconds.
Fields
UnixTime
Unix time in seconds.
public readonly long UnixTime
Field Value
Methods
Equals(AmqpTimestamp)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(AmqpTimestamp other)
Parameters
other
AmqpTimestampAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe 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
Operators
operator ==(AmqpTimestamp, AmqpTimestamp)
public static bool operator ==(AmqpTimestamp left, AmqpTimestamp right)
Parameters
left
AmqpTimestampright
AmqpTimestamp
Returns
operator !=(AmqpTimestamp, AmqpTimestamp)
public static bool operator !=(AmqpTimestamp left, AmqpTimestamp right)
Parameters
left
AmqpTimestampright
AmqpTimestamp