public void Update(CBfxStockStorUpdStock data)
        {
            CBfxStorStorMsg msg = new CBfxStorStorMsg {
                Event = EnmStockMsgUpd.UpdateStock, Data = data
            };

            _queue.Add(msg);
        }
 public void EnqueueSendAuthResponse(bool isSuccess, string errMsg, int connId)
 {
     _bqTraderData.Add(new CTradingData
     {
         Data = (object)new CAuthResponse {
             IsSuccess = isSuccess, ErrorMessage = errMsg
         },
         Event  = enmTradingEvent.AuthResponse,
         ConnId = connId
     }
                       );
 }
        public void ThreadWriter()
        {
            int i = 0;

            while (true)
            {
                _bq.Add(DateTime.Now);
                if (i++ > 20)
                {
                    Thread.Sleep(1);
                    i = 0;
                }
            }
        }
Esempio n. 4
0
        public void ExecuteWindowsUpdate(Action act)
        {
            try
            {
                sw.Start();
                // m_blkColUpdateWindowsActions.Add(act);

                m_bqActions.Add(act);


                sw.Stop();

                //  if (sw.ElapsedMilliseconds > 0)
                //    System.Threading.Thread.Sleep(0);
            }
            catch (Exception e)
            {
                Error("ExecuteWindowsUpdate", e);
            }
        }
Esempio n. 5
0
        private void ThreadProducer()
        {
            CLogger log = new CLogger("qProducer");

            long i = 0;

            while (true)
            {
                string st = i++.ToString();
                sw.Start();
                _queue.Add(st);
                sw.Stop();
                // log.Log(st);
                if (sw.ElapsedMilliseconds > 20)
                {
                    int tmp = 1;
                }

                Thread.Sleep(1);
            }
        }
Esempio n. 6
0
 public void ExecuteWindowsDealsUpdate(Action act)
 {
     m_bqDealsActions.Add(act);
 }
Esempio n. 7
0
 public void ExecuteWindowsStockUpdate(Action act)
 {
     m_bqStockActions.Add(act);
 }
 /// <summary>
 /// Add new Raw stock
 /// </summary>
 /// <param name="rs"></param>
 public void Add(CRawStock rs)
 {
     m_bqOrdersAggr.Add(rs);
 }
 public void EnqueueUpdateStockCommand(string isin)
 {
     _bqTraderData.Add(new CTradingData
     {
         Data  = (object)isin,
         Event = enmTradingEvent.StockUpadate
     }
                       );
 }
Esempio n. 10
0
 public void Update(CRawDeal rd)
 {
     m_bqRawDeal.Add(rd);
     //    m_lastUpdate = rd.Moment;
     TimeLastDeal = rd.Moment;
 }
 public void SendMessage(byte[] message)
 {
     _queueWriteBinary.Add(message);
 }
 public void Add(string isin, string tf, string dt, CTimeFrameInfo tfi)
 {
     _q.Add(new CStructTF(isin, tf, dt, (CTimeFrameInfo)tfi.Copy()));
 }
Esempio n. 13
0
 public void LogMsg(CLogStruct bqLog)
 {
     _bqLog.Add(bqLog);
 }
 public void Update(CDeal deal)
 {
     _queue.Add(deal);
 }
 public void AddNewDeal(CRawDeal rd)
 {
     DelayIfLargMemUsage();
     //m_blkColRowDeals.Add(rd);
     m_bqRawDeals.Add(rd);
 }