FastQuant.DataManager.GetHistoricalBars C# (CSharp) Method

GetHistoricalBars() public method

public GetHistoricalBars ( IHistoricalDataProvider provider, Instrument instrument, System.DateTime dateTime1, System.DateTime dateTime2, BarType barType, long barSize ) : BarSeries
provider IHistoricalDataProvider
instrument Instrument
dateTime1 System.DateTime
dateTime2 System.DateTime
barType BarType
barSize long
return BarSeries
        public BarSeries GetHistoricalBars(IHistoricalDataProvider provider, Instrument instrument, DateTime dateTime1, DateTime dateTime2, BarType barType, long barSize)
        {
            if (provider.IsDisconnected)
                provider.Connect();

            DataManager.DataNotifier @class = new DataManager.DataNotifier();
            string text = Guid.NewGuid().ToString();
            lock (this.dictionary_0)
            {
                this.dictionary_0.Add(text, @class);
            }
            provider.Send(new HistoricalDataRequest(instrument, dateTime1, dateTime2, 6)
            {
                RequestId = text,
                BarType = new BarType?(barType),
                BarSize = new long?(barSize)
            });
            @class.ReadyEvent.WaitOne();
            lock (this.dictionary_0)
            {
                this.dictionary_0.Remove(text);
            }
            var bs = new BarSeries("", "", -1, -1);
            foreach (var data in @class.Data)
            {
                var objs = data.Objects;
                for (int i = 0; i < objs.Length; i++)
                    bs.Add((Bar)objs[i]);
            }
            return bs;
        }

Same methods

DataManager::GetHistoricalBars ( Instrument instrument, BarType barType, long barSize ) : BarSeries
DataManager::GetHistoricalBars ( Instrument instrument, System.DateTime dateTime1, System.DateTime dateTime2, BarType barType, long barSize ) : BarSeries
DataManager::GetHistoricalBars ( string symbol, BarType barType, long barSize ) : BarSeries
DataManager::GetHistoricalBars ( string symbol, System.DateTime dateTime1, System.DateTime dateTime2, BarType barType, long barSize ) : BarSeries
DataManager::GetHistoricalBars ( string provider, Instrument instrument, System.DateTime dateTime1, System.DateTime dateTime2, BarType barType, long barSize ) : BarSeries
DataManager::GetHistoricalBars ( string provider, string symbol, System.DateTime dateTime1, System.DateTime dateTime2, BarType barType, long barSize ) : BarSeries