public static long?ReadNullableLong(this BitArrayReader reader) { if (!reader.Read()) { return(null); } return(reader.ReadLong()); }
private static decimal ReadPrice(this BitArrayReader reader, decimal prevPrice, decimal priceStep, bool useLong) { var count = useLong ? reader.ReadLong() : reader.ReadInt(); return(prevPrice + count * priceStep); }
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); }
public static DateTimeOffset?ReadDto(this BitArrayReader reader) { return(reader.Read() ? reader.ReadLong().To <DateTime>().ApplyTimeZone(new TimeSpan(reader.ReadInt(), reader.ReadInt(), 0)) : (DateTimeOffset?)null); }
public static void ReadSeqNum <TMessage>(this BitArrayReader reader, TMessage message, BinaryMetaInfo metaInfo) where TMessage : ISeqNumMessage { metaInfo.FirstSeqNum += reader.ReadLong(); message.SeqNum = metaInfo.FirstSeqNum; }