public static byte[] ToBytes(this IFixedWidth obj) { var result = new byte[obj.Size()]; obj.Serialize(result); return(result); }
public static string ToHex(this IFixedWidth obj) { return(obj.ToBytes().ToHex()); }
public static int Size(this IFixedWidth obj) { return(FixedWidthSize(obj.GetType())); }