public List<Fundamental> GetHistoricalFundamentals(IHistoricalDataProvider provider, Instrument instrument, DateTime dateTime1, DateTime dateTime2)
{
if (provider.IsDisconnected)
{
provider.Connect();
}
var @class = new DataNotifier();
var guid = Guid.NewGuid().ToString();
lock (this.dictionary_0)
{
this.dictionary_0.Add(guid, @class);
}
provider.Send(new HistoricalDataRequest(instrument, dateTime1, dateTime2, DataObjectType.Fundamental)
{
RequestId = guid
});
@class.ReadyEvent.WaitOne();
lock (this.dictionary_0)
{
this.dictionary_0.Remove(guid);
}
return @class.Data.SelectMany(current => current.Objects).Cast<Fundamental>().ToList();
}