示例#1
0
        public void GetLiveBars()
        {
            var watch = Stopwatch.StartNew();

            _fetchData.ReadData(_barDataRequest);

            watch.Stop();
            var elapsedMs = watch.ElapsedMilliseconds;

            Logger.Debug("Time consumer: " + elapsedMs, "SimulatorControler.Test.Unit", "GetLiveBars");
        }
示例#2
0
 /// <summary>
 /// Creats a seprate thread for each request.
 /// </summary>
 /// <param name="request"></param>
 public void FetchData(BarDataRequest request)
 {
     try
     {
         Task.Factory.StartNew(() => _fetchMarketData.ReadData(request));
     }
     catch (Exception exception)
     {
         _classLogger.Error(exception, _type.FullName, "FetchData");
     }
 }
示例#3
0
        /// <summary>
        /// Creats a seprate thread for each request.
        /// </summary>
        /// <param name="request"></param>
        public void FetchData(BarDataRequest request)
        {
            try
            {
                var task = Task.Factory.StartNew(() => _fetchMarketData.ReadData(request));

                _tasksCollection.Add(task);

                //_marketDataList=_fetchMarketData.ReadData(request,true);
                //_persistanceDataCount=_marketDataList.Count;
                //Task.Factory.StartNew(UseLocalData1);
            }
            catch (Exception exception)
            {
                _classLogger.Error(exception, _type.FullName, "FetchData");
            }
        }