public override DbgCodeBreakpoint[] Add(DbgCodeBreakpointInfo[] breakpoints)
        {
            if (breakpoints is null)
            {
                throw new ArgumentNullException(nameof(breakpoints));
            }
            var bpImpls = new List <DbgCodeBreakpointImpl>(breakpoints.Length);
            List <DbgObject>?objsToClose = null;

            lock (lockObj) {
                for (int i = 0; i < breakpoints.Length; i++)
                {
                    var info     = breakpoints[i];
                    var location = info.Location;
                    if (locationToBreakpoint.ContainsKey(location))
                    {
                        if (objsToClose is null)
                        {
                            objsToClose = new List <DbgObject>();
                        }
                        objsToClose.Add(location);
                    }
                    else
                    {
                        var bp = new DbgCodeBreakpointImpl(this, breakpointId++, info.Options, location, info.Settings, isDebugging);
                        bpImpls.Add(bp);
                    }
                }
                Dbg(() => AddCore(bpImpls, objsToClose));
            }
            return(bpImpls.ToArray());
        }
 internal void OnBoundBreakpointsMessageChanged_DbgThread(DbgCodeBreakpointImpl bp)
 {
     dbgDispatcherProvider.VerifyAccess();
     bp.RaiseBoundBreakpointsMessageChanged_DbgThread();
     BoundBreakpointsMessageChanged?.Invoke(this, new DbgBoundBreakpointsMessageChangedEventArgs(new ReadOnlyCollection <DbgCodeBreakpoint>(new[] { bp })));
 }