コード例 #1
0
ファイル: Program.cs プロジェクト: minhpascal/qdms
 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);
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: KBurov/qdms
 private static void client_LocallyAvailableDataInfoReceived(object sender, LocallyAvailableDataInfoReceivedEventArgs e)
 {
     foreach (var s in e.StorageInfo)
     {
         Console.WriteLine($"Freq: {s.Frequency} - From {s.EarliestDate} to {s.LatestDate}");
     }
 }
コード例 #3
0
ファイル: QDMS.cs プロジェクト: zino974/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);
                }
            }
        }