Example #1
0
 public override void EncodeObject(object value, bool arrayEncoding, ByteBuffer buffer)
 {
     if (arrayEncoding)
     {
         AmqpBitConverter.WriteShort(buffer, (short)value);
     }
     else
     {
         ShortEncoding.Encode((short)value, buffer);
     }
 }
Example #2
0
 /// <summary>
 /// Encodes a 16-bit signed integer and appends the bytes to the buffer.
 /// </summary>
 /// <param name="data">The 16-bit signed integer.</param>
 /// <param name="buffer">The destination buffer.</param>
 public static void EncodeShort(short?data, ByteBuffer buffer)
 {
     ShortEncoding.Encode(data, buffer);
 }