/// <summary>
        ///     Binds this pending breakpoint to one or more code locations.
        /// </summary>
        /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns>
        public int Bind()
        {
            TEXT_POSITION[] startPosition;
            TEXT_POSITION[] endPosition;
            var             engine       = _breakpointManager.Engine;
            var             documentName = engine.GetLocationInfo(_requestInfo.bpLocation.unionmember2, out startPosition,
                                                                  out endPosition);

            // documentName = engine.TranslateToBuildServerPath(documentName);

            _breakpoint = engine.Program.Session.Breakpoints.Add(documentName, (int)startPosition[0].dwLine + 1,
                                                                 (int)startPosition[0].dwColumn + 1);
            _breakpointManager.Add(_breakpoint, this);
            SetCondition(_requestInfo.bpCondition);
            SetPassCount(_requestInfo.bpPassCount);

            // Enable(...) would have already been called before Bind
            if (!_isEnabled)
            {
                _breakpoint.Enabled = false;
            }

            lock (_boundBreakpoints)
            {
                uint address = 0;
                var  breakpointResolution = new MonoBreakpointResolution(engine, address, GetDocumentContext(address));
                var  boundBreakpoint      = new MonoBoundBreakpoint(this, breakpointResolution);
                _boundBreakpoints.Add(boundBreakpoint);

                engine.Callback.Send(new MonoBreakpointBoundEvent(this, boundBreakpoint), MonoBreakpointBoundEvent.Iid, null);
            }

            return(S_OK);
        }
 public MonoBoundBreakpoint(MonoPendingBreakpoint pendingBreakpoint,
                            MonoBreakpointResolution breakpointResolution)
 {
     _pendingBreakpoint    = pendingBreakpoint;
     _breakpointResolution = breakpointResolution;
 }