Exemplo n.º 1
0
 public static decimal?ReadCompressedNullableDecimal(this IReadBytes stream)
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadCompressedDecimal());
 }
 public static long?ReadCompressedNullableLong(this IReadBytes stream)
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadCompressedLong());
 }
Exemplo n.º 3
0
 public static MonthStamp?ReadCompressedNullableMonthStamp(this IReadBytes stream)
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadCompressedMonthStamp());
 }
Exemplo n.º 4
0
 public static T?ReadCompressedNullableEnum <T>(this IReadBytes stream) where T : struct, Enum
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadCompressedEnum <T>());
 }
 public static uint?ReadCompressedNullableUInt(this IReadBytes stream)
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadCompressedUInt());
 }
Exemplo n.º 6
0
 public static double?ReadNullableFullDouble(this IReadBytes stream)
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadFullDouble());
 }
Exemplo n.º 7
0
 public static DateTime?ReadCompressedNullableDateTime(this IReadBytes stream)
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadCompressedDateTime());
 }
        public static byte[] ReadCompressedByteArray(this IReadBytes stream)
        {
            if (!stream.ReadCompressedBool())
            {
                return(null);
            }
            var length = (int)stream.ReadCompressedUInt();

            return(stream.ReadBytes(length));
        }
Exemplo n.º 9
0
        public static string ReadCompressedString(this IReadBytes stream)
        {
            if (!stream.ReadCompressedBool())
            {
                return(null);
            }
            var length = (int)UIntCompressor.ReadCompressedUInt(stream);
            var bytes  = new byte[length];

            stream.ReadBytes(bytes, 0, length);
            return(Encoding.GetString(bytes));
        }