protected void HandleSecurityChanged(SecurityEventArgs sec) { if (OnSecurityChanged != null) { OnSecurityChanged(sec); } }
private void dataProvider_OnSecurityChanged(SecurityEventArgs arg) { Security sec = arg.Security; if (sec != null) { string feedMsg = arg.Message; string fl = sec.OrgSecurity.FirstOrDefault().ToString(); DbLogQueue dbQ = FindQueue(fl.ToUpper()); if (dbQ != null) { SecurityDbLog log = new SecurityDbLogAdapter(sec, feedMsg); log.DbManager = dbQ.DbManager; dbQ.Enqueue(log); } else { ProcessException(new ApplicationException(String.Format("{0} senedi için db kuyruğu bulunamadı", sec.OrgSecurity))); } #region MyRegion //if (DistOption.DistributeLimitControl && DistExchangeIDList.Contains(sec.ExchangeID)) //{ // DistStreamQueue.Enqueue(() => // { // LimitControl lc = new LimitControl(); // lc.OrgSecurity = sec.OrgSecurity; // lc.Symbol = sec.Symbol; // lc.SymbolSfx = sec.SymbolSfx; // lc.LastUpdate = sec.LastUpdate; // lc.IsDeleted = sec.IsDeleted; // lc.Last = sec.Last; // lc.IsBist30 = sec.IsBist30; // lc.IsBist50 = sec.IsBist50; // lc.IsBist100 = sec.IsBist100; // lc.ExchangeID = sec.ExchangeID; // //Broadcaster.BroadCastLimitControl(lc);//TODO bunucuda scs ile gonder // }); //} #endregion if (DistOption.DistributeSecurity && DistExchangeIDList.Contains(sec.ExchangeID)) { DistStreamQueue.Enqueue(() => { BroadcastSecurity(sec); }); } } }