Esempio n. 1
0
 static void client_LocallyAvailableDataInfoReceived(object sender, LocallyAvailableDataInfoReceivedEventArgs e)
 {
     foreach (StoredDataInfo s in e.StorageInfo)
     {
         Console.WriteLine("Freq: {0} - From {1} to {2}", s.Frequency, s.EarliestDate, s.LatestDate);
     }
 }
Esempio n. 2
0
File: QDMS.cs Progetto: QANTau/QPAS
        private void DataClient_LocallyAvailableDataInfoReceived(object sender, LocallyAvailableDataInfoReceivedEventArgs e)
        {
            if (e.Instrument.ID == null) throw new Exception("Null instrument ID return wtf");
            int id = e.Instrument.ID.Value;
            lock (_storageInfoLock)
            {
                StoredDataInfo info = e.StorageInfo.FirstOrDefault(x => x.Frequency == BarSize.OneDay);
                if (info == null) return;

                if (_storageInfo.ContainsKey(id))
                    _storageInfo[id] = info;
                else
                    _storageInfo.Add(id, info);
            }
        }