Exemplo n.º 1
0
        public override void Write(BinaryWriter writer, object obj)
        {
            AltId altId = (AltId)obj;

            writer.Write(altId.ProviderId);
            writer.Write(altId.Symbol);
            writer.Write(altId.Exchange);
            if (this.version >= 1)
            {
                writer.Write(altId.ProviderId);
            }
        }
Exemplo n.º 2
0
        public byte GetCurrencyId(byte providerId)
        {
            var altId = AltId.Get(providerId);

            if (altId != null && altId.CurrencyId != 0)
            {
                return(altId.CurrencyId);
            }
            else
            {
                return(CurrencyId);
            }
        }
Exemplo n.º 3
0
        public override object Read(BinaryReader reader, byte version)
        {
            var providerId = reader.ReadByte();
            var symbol     = reader.ReadString();
            var exchange   = reader.ReadString();
            var altId      = new AltId(providerId, symbol, exchange);

            if (version >= 1)
            {
                altId.CurrencyId = reader.ReadByte();
            }
            return(altId);
        }
Exemplo n.º 4
0
 public override object Read(BinaryReader reader, byte version)
 {
     var providerId = reader.ReadByte();
     var symbol = reader.ReadString();
     var exchange = reader.ReadString();
     var altId = new AltId(providerId, symbol, exchange);
     if (version >= 1)
         altId.CurrencyId = reader.ReadByte();
     return altId;
 }