コード例 #1
0
ファイル: IntEncoding.cs プロジェクト: xinchen10/azure-amqp
 public override int GetObjectEncodeSize(object value, bool arrayEncoding)
 {
     if (arrayEncoding)
     {
         return(FixedWidth.Int);
     }
     else
     {
         return(IntEncoding.GetEncodeSize((int)value));
     }
 }
コード例 #2
0
 /// <summary>
 /// Gets the encode size of a 32-bit signed integer.
 /// </summary>
 /// <param name="value">The 32-bit signed integer.</param>
 /// <returns>Encode size in bytes of the 32-bit signed integer.</returns>
 public static int GetIntEncodeSize(int?value)
 {
     return(IntEncoding.GetEncodeSize(value));
 }