Exemplo n.º 1
0
        public bool CheckBreakPointRequest(Event evt, out bool terminate)
        {
            var bpe = evt as BreakpointEvent;

            if (bpe == null)
            {
                terminate = false;
            }
            else
            {
                terminate = $"{bpe.Method.DeclaringType.FullName}.{bpe.Method.Name}" == TerminatorMethod;
                BreakPoint bp = null;
                if (rbps.TryGetValue(bpe.Request as BreakpointEventRequest, out bp))
                {
                    CodeRecord rec = bp.Record;
                    lock ( DataStore )
                    {
                        rec.Hit(bp.Location.LineNumber);

                        if (bp.Location.LineNumber == bp.Record.GetFirstLine())
                        {
                            rec.CallCount++;
                        }

                        if (!HitCount)
                        {
                            bpe.Request.Disable();
                        }
                    }
                }
            }
            return(bpe != null);
        }
Exemplo n.º 2
0
        public bool CheckBreakPointRequest(Event evt)
        {
            var bpe = evt as BreakpointEvent;

            if (bpe != null)
            {
                BreakPoint bp = null;
                if (rbps.TryGetValue(bpe.Request as BreakpointEventRequest, out bp))
                {
                    CodeRecord rec = bp.Record;
                    lock ( DataStore )
                    {
                        rec.Hit(bp.Location.LineNumber);

                        if (bp.Location.LineNumber == bp.Record.GetFirstLine())
                        {
                            rec.CallCount++;
                        }

                        if (!HitCount)
                        {
                            bpe.Request.Disable();
                        }
                    }
                }
            }
            return(bpe != null);
        }