Example #1
0
 public override int GetObjectEncodeSize(object value, bool arrayEncoding)
 {
     if (arrayEncoding)
     {
         return(FixedWidth.UInt);
     }
     else
     {
         return(UIntEncoding.GetEncodeSize((uint)value));
     }
 }
Example #2
0
 /// <summary>
 /// Gets the encode size of a 32-bit unsigned integer.
 /// </summary>
 /// <param name="value">The 32-bit unsigned integer.</param>
 /// <returns>Encode size in bytes of the 32-bit unsigned integer.</returns>
 public static int GetUIntEncodeSize(uint?value)
 {
     return(UIntEncoding.GetEncodeSize(value));
 }