/// <summary> /// Creates an enumerator of breakpoints that were bound on this event. (http://msdn.microsoft.com/en-us/library/bb145322.aspx) /// </summary> /// <param name="ppEnum"> Returns an IEnumDebugBoundBreakpoints2 object that enumerates all the breakpoints bound from /// this event. </param> /// <returns> VSConstants.S_OK. </returns> int IDebugBreakpointBoundEvent2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum) { IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[1]; boundBreakpoints[0] = m_boundBreakpoint; ppEnum = new AD7BoundBreakpointsEnum(boundBreakpoints); return(VSConstants.S_OK); }
/// <summary> /// Enumerates all breakpoints bound from this pending breakpoint. (http://msdn.microsoft.com/en-ca/library/bb145139.aspx) /// </summary> /// <param name="ppEnum"> Returns an IEnumDebugBoundBreakpoints2 object that enumerates the bound breakpoints. </param> /// <returns> VSConstants.S_OK. </returns> int IDebugPendingBreakpoint2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum) { lock (m_boundBreakpoints) { IDebugBoundBreakpoint2[] boundBreakpoints = m_boundBreakpoints.ToArray(); ppEnum = new AD7BoundBreakpointsEnum(boundBreakpoints); } return(VSConstants.S_OK); }
/// <summary> /// Send an event to SDM with the breakpoint that was hit. /// </summary> /// <param name="thread"> The thread running in a program. </param> /// <param name="clients"> List of bound breakpoints. At this moment, this list has only one element. </param> public void OnBreakpoint(AD7Thread thread, IList <IDebugBoundBreakpoint2> clients) { IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count]; int i = 0; foreach (object objCurrentBreakpoint in clients) { boundBreakpoints[i] = (IDebugBoundBreakpoint2)objCurrentBreakpoint; i++; } AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints); AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpointsEnum); Send(eventObject, AD7BreakpointEvent.IID, thread); }