Пример #1
0
 public override void EncodeObject(object value, bool arrayEncoding, ByteBuffer buffer)
 {
     if (arrayEncoding)
     {
         AmqpBitConverter.WriteInt(buffer, (int)value);
     }
     else
     {
         IntEncoding.Encode((int)value, buffer);
     }
 }
Пример #2
0
 /// <summary>
 /// Encodes a 32-bit signed integer and appends the bytes to the buffer.
 /// </summary>
 /// <param name="data">The 32-bit signed integer.</param>
 /// <param name="buffer">The destination buffer.</param>
 public static void EncodeInt(int?data, ByteBuffer buffer)
 {
     IntEncoding.Encode(data, buffer);
 }