public override void EncodeObject(object value, bool arrayEncoding, ByteBuffer buffer) { if (arrayEncoding) { AmqpBitConverter.WriteShort(buffer, (short)value); } else { ShortEncoding.Encode((short)value, buffer); } }
/// <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); }