public override int GetObjectEncodeSize(object value, bool arrayEncoding) { if (arrayEncoding) { return(FixedWidth.Short); } else { return(ShortEncoding.GetEncodeSize((short)value)); } }
/// <summary> /// Gets the encode size of a 16-bit signed integer. /// </summary> /// <param name="value">The 16-bit signed integer.</param> /// <returns>Encode size in bytes of the 16-bit signed integer.</returns> public static int GetShortEncodeSize(short?value) { return(ShortEncoding.GetEncodeSize(value)); }