public SecurityDepthEventArgs(SecurityDepth securityDepth)
 {
     this.SecurityDepth = securityDepth;
 }
 public SecurityDepthEventArgs(SecurityDepth securityDepth, string message)
     : this(securityDepth)
 {
     this.Message = message;
 }
        private void TryParse064(string dataFeedMsg)//Derinlik kademesi update
        {
            try
            {
                string   source = dataFeedMsg.Substring(0, 3);
                string   tmp1   = dataFeedMsg.Substring(3, 1);
                int      tmpInt1;
                string   notSymbolData = dataFeedMsg.Substring(3, dataFeedMsg.Length - 3);
                string[] svalues       = Split(notSymbolData);
                string   origSymbol    = svalues[0];

                int l = svalues.Length;

                if (l != 9 || (l != 9 && int.TryParse(tmp1, out tmpInt1)))
                {
                    HandleLog("Wrong 064 Message : " + dataFeedMsg);
                    return;
                }
                if (string.IsNullOrEmpty(origSymbol))
                {
                    HandleLog("Missing Symbol Field 064 Message : " + dataFeedMsg);
                    return;
                }


                string tmpSide   = svalues[1];
                string tmpRow    = svalues[2];
                string tmpPrice  = svalues[3];
                string tmpLots   = svalues[4];
                string tmporders = svalues[5];
                string time      = svalues[6];
                string tmpDepth  = svalues[7];

                decimal price;
                int     lots;
                int     orders;
                int     side;
                int     depth;
                int     row;



                if (int.TryParse(tmpRow, out row) == false)
                {
                    HandleLog("Missing RowIndex Field 064 Message : " + dataFeedMsg);
                    return;
                }

                int listIndex = row - 1;
                decimal.TryParse(tmpPrice, out price);
                int.TryParse(tmpLots, out lots);
                int.TryParse(tmporders, out orders);
                int.TryParse(tmpSide, out side);//0=> Buy 1=> Sell
                int.TryParse(tmpDepth, out depth);
                Quote         q        = null;
                SecurityDepth secDepth = null;

                // DispatchService.BeginInvoke(new Action(() =>
                //{
                QuoteValues.AddOrUpdate(origSymbol, (q = new Quote()
                {
                    Name = origSymbol, DepthCollection = GetQouteCollection(origSymbol, depth)
                }), (k, v) =>
                {
                    q = v;
                    return(q);
                });
                //}));
                // DispatchService.BeginInvoke(new Action(() =>
                // {
                q.DepthCollection.AddOrUpdate(listIndex, (secDepth = new SecurityDepth()
                {
                    Name = origSymbol
                }), (k, v) =>
                {
                    secDepth = v;
                    return(secDepth);
                });
                //}));
                secDepth.RowIndex       = listIndex;
                secDepth.Source         = source;
                MaxTimeStamp            = DateTime.Now;
                q.LastUpdateTime        = MaxTimeStamp;
                secDepth.LastUpdateTime = MaxTimeStamp;
                secDepth.LastStreamTime = time;
                if (side == 0)
                {
                    secDepth.BuyPrice  = price;
                    secDepth.BuyLots   = lots;
                    secDepth.BuyOrders = orders;
                }
                else
                {
                    secDepth.SellPrice  = price;
                    secDepth.SellLots   = lots;
                    secDepth.SellOrders = orders;
                }

                HandleSecurityDepthChanged(new SecurityDepthEventArgs(secDepth));
            }
            catch (Exception ex)
            {
                TBYException tex = new TBYException(MethodInfo.GetCurrentMethod().GetFullName(), "Matrkiks sembol derinlik verisi işlenirken hata oluştu", ex);
                HandleException(tex);
            }
        }