Esempio 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());
 }
Esempio n. 3
0
 public static MonthStamp?ReadCompressedNullableMonthStamp(this IReadBytes stream)
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadCompressedMonthStamp());
 }
Esempio 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());
 }
Esempio n. 6
0
 public static double?ReadNullableFullDouble(this IReadBytes stream)
 {
     if (!stream.ReadCompressedBool())
     {
         return(null);
     }
     return(stream.ReadFullDouble());
 }
Esempio 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));
        }
Esempio 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));
        }