示例#1
0
 public override void EncodeObject(object value, bool arrayEncoding, ByteBuffer buffer)
 {
     if (arrayEncoding)
     {
         AmqpBitConverter.WriteUByte(buffer, (byte)value);
     }
     else
     {
         UByteEncoding.Encode((byte)value, buffer);
     }
 }
示例#2
0
 /// <summary>
 /// Encodes an 8-bit unsigned integer and appends the bytes to the buffer.
 /// </summary>
 /// <param name="data">The 8-bit unsigned integer.</param>
 /// <param name="buffer">The destination buffer.</param>
 public static void EncodeUByte(byte?data, ByteBuffer buffer)
 {
     UByteEncoding.Encode(data, buffer);
 }