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