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); } }
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}"); } }
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); } } }