Esempio n. 1
0
 public override int GetObjectEncodeSize(object value, bool arrayEncoding)
 {
     if (arrayEncoding)
     {
         return(FixedWidth.Int);
     }
     else
     {
         return(IntEncoding.GetEncodeSize((int)value));
     }
 }
Esempio n. 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));
 }