コード例 #1
0
        public static long?ReadNullableLong(this BitArrayReader reader)
        {
            if (!reader.Read())
            {
                return(null);
            }

            return(reader.ReadLong());
        }
コード例 #2
0
        private static decimal ReadPrice(this BitArrayReader reader, decimal prevPrice, decimal priceStep, bool useLong)
        {
            var count = useLong ? reader.ReadLong() : reader.ReadInt();

            return(prevPrice + count * priceStep);
        }
コード例 #3
0
        public static decimal ReadPrice(this BitArrayReader reader, decimal prevPrice, MetaInfo info, bool useLong = false)
        {
            var count = useLong ? reader.ReadLong() : reader.ReadInt();

            return(prevPrice + count * info.PriceStep);
        }
コード例 #4
0
 public static DateTimeOffset?ReadDto(this BitArrayReader reader)
 {
     return(reader.Read() ? reader.ReadLong().To <DateTime>().ApplyTimeZone(new TimeSpan(reader.ReadInt(), reader.ReadInt(), 0)) : (DateTimeOffset?)null);
 }
コード例 #5
0
 public static void ReadSeqNum <TMessage>(this BitArrayReader reader, TMessage message, BinaryMetaInfo metaInfo)
     where TMessage : ISeqNumMessage
 {
     metaInfo.FirstSeqNum += reader.ReadLong();
     message.SeqNum        = metaInfo.FirstSeqNum;
 }