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