C# Class RabbitMQ.Client.BinaryTableValue

Wrapper for a byte[]. May appear as values read from and written to AMQP field tables.

The sole reason for the existence of this class is to permit encoding of byte[] as 'x' in AMQP field tables, an extension to the specification that is part of the tentative JMS mapping implemented by QPid.

Instances of this object may be found as values held in IDictionary instances returned from RabbitMQ.Client.Impl.WireFormatting.ReadTable, e.g. as part of IBasicProperties.Headers tables. Likewise, instances may be set as values in an IDictionary table to be encoded by RabbitMQ.Client.Impl.WireFormatting.WriteTable.

When an instance of this class is encoded/decoded, the type tag 'x' is used in the on-the-wire representation. The AMQP standard type tag 'S' is decoded to a raw byte[], and a raw byte[] is encoded as 'S'. Instances of System.String are converted to a UTF-8 binary representation, and then encoded using tag 'S'. In order to force the use of tag 'x', instances of this class must be used.

ファイルを表示 Open project: Chatham/rabbitmq-dotnet-client Class Usage Examples

Public Methods

Method Description
BinaryTableValue ( )

Constructs an instance with null for its Bytes property.

BinaryTableValue ( byte bytes )

Constructs an instance with the passed-in value for its Bytes property.

Method Details

BinaryTableValue() public method

Constructs an instance with null for its Bytes property.
public BinaryTableValue ( )

BinaryTableValue() public method

Constructs an instance with the passed-in value for its Bytes property.
public BinaryTableValue ( byte bytes )
bytes byte