public class AmqpVersion

Summary

Represents a version of the AMQP specification.

Remarks

Vendor-specific variants of particular official specification versions exist: this class simply represents the AMQP specification version, and does not try to represent information about any custom variations involved.

AMQP version 0-8 peers sometimes advertise themselves as version 8-0: for this reason, this class's constructor special-cases 8-0, rewriting it at construction time to be 0-8 instead.

Property Summary

Flags Type Name Summary
public int Major (r)

The AMQP specification major version number

public int Minor (r)

The AMQP specification minor version number

Constructor Summary

Flags Name Summary
public AmqpVersion(int major, int minor)

Construct an AmqpVersion from major and minor version numbers.

Method Summary

Flags Name Summary
public virtual bool Equals(object other)

Implement value-equality comparison.

public virtual int GetHashCode()

Implement hashing as for value-equality.

public virtual string ToString()

Format appropriately for display.

Property Detail

public int Major (r)

Summary

The AMQP specification major version number

public int Minor (r)

Summary

The AMQP specification minor version number

Constructor Detail

AmqpVersion

public AmqpVersion(int major, int minor)

Parameters
Name Type
major int
minor int

Summary

Construct an AmqpVersion from major and minor version numbers.

Remarks

Converts major=8 and minor=0 into major=0 and minor=8. Please see the class comment.

Method Detail

Equals

public virtual bool Equals(object other)

Flags public virtual
Return type bool
Parameters
Name Type
other object

Summary

Implement value-equality comparison.

GetHashCode

public virtual int GetHashCode()

Flags public virtual
Return type int

Summary

Implement hashing as for value-equality.

ToString

public virtual string ToString()

Flags public virtual
Return type string

Summary

Format appropriately for display.

Remarks

The specification currently uses "MAJOR-MINOR" as a display format.