/// <summary> /// Toggles a breakpoint, returning true if the breakpoint was set, and false if it was cleared. /// </summary> /// <param name="locator">A locator identifying the document or operator in which the breakpoint is set.</param> /// <param name="line">The line on which the breakpoint is set.</param> /// <param name="linePos">The line position, -1 for no line position.</param> /// <returns>True if the breakpoint was set, false if it was cleared.</returns> public bool ToggleBreakpoint(string locator, int line, int linePos) { lock (_syncHandle) { Breakpoint breakpoint = new Breakpoint(locator, line, linePos); int index = _breakpoints.IndexOf(breakpoint); if (index >= 0) { _breakpoints.Remove(breakpoint); return(false); } else { _breakpoints.Add(breakpoint); return(true); } } }
public int IndexOf(Breakpoint item) { return(Breakpoints.IndexOf(item)); }