Пример #1
0
        public static byte[] ToBytes(this IFixedWidth obj)
        {
            var result = new byte[obj.Size()];

            obj.Serialize(result);
            return(result);
        }
Пример #2
0
 public static string ToHex(this IFixedWidth obj)
 {
     return(obj.ToBytes().ToHex());
 }
Пример #3
0
 public static int Size(this IFixedWidth obj)
 {
     return(FixedWidthSize(obj.GetType()));
 }