int IDebugPendingBreakpoint2.CanBind(out IEnumDebugErrorBreakpoints2 ppErrorEnum) { Debug.WriteLine("AD7Breakpoint: CanBind"); int result = VSConstants.S_OK; ppErrorEnum = null; if (_lineNumber == 0) { result = FindBreakpointLine(); } if (result != VSConstants.S_OK) { return(result); } if (DebuggerManager.Instance.Debugger.CanBindBreakpoint(( int )this._lineNumber)) { ppErrorEnum = null; return(VSConstants.S_OK); } else { // TODO: Can also return deleted breakpoint, see constant E_BP_DELETED Ad7EnumDebugErrorBreakpoints enumBp = new Ad7EnumDebugErrorBreakpoints(); enumBp.Add(new AD7DebugErrorBreakpoint(this)); ppErrorEnum = enumBp; return(VSConstants.E_FAIL); } }
protected Ad7EnumDebugErrorBreakpoints(Ad7EnumDebugErrorBreakpoints enumerator) { Debug.WriteLine("Ad7EnumDebugErrorBreakpoints: ctor clone"); IEnumDebugErrorBreakpoints2 e = (IEnumDebugErrorBreakpoints2)enumerator; e.Reset(); _errors = new List<IDebugErrorBreakpoint2>(); uint cnt; e.GetCount(out cnt); for (int i = 0; i < cnt; i++) { IDebugErrorBreakpoint2[] err = new IDebugErrorBreakpoint2[ 1 ]; uint fetched = 1; e.Next(1, err, ref fetched); _errors.Add(err[0]); } }
protected Ad7EnumDebugErrorBreakpoints(Ad7EnumDebugErrorBreakpoints enumerator) { Debug.WriteLine("Ad7EnumDebugErrorBreakpoints: ctor clone"); IEnumDebugErrorBreakpoints2 e = (IEnumDebugErrorBreakpoints2)enumerator; e.Reset(); _errors = new List <IDebugErrorBreakpoint2>(); uint cnt; e.GetCount(out cnt); for (int i = 0; i < cnt; i++) { IDebugErrorBreakpoint2[] err = new IDebugErrorBreakpoint2[1]; uint fetched = 1; e.Next(1, err, ref fetched); _errors.Add(err[0]); } }
int IDebugPendingBreakpoint2.CanBind(out IEnumDebugErrorBreakpoints2 ppErrorEnum) { Debug.WriteLine("AD7Breakpoint: CanBind"); int result = VSConstants.S_OK; ppErrorEnum = null; if (_lineNumber == 0) result = FindBreakpointLine(); if (result != VSConstants.S_OK) return result; if (DebuggerManager.Instance.Debugger.CanBindBreakpoint( ( int )this._lineNumber)) { ppErrorEnum = null; return VSConstants.S_OK; } else { // TODO: Can also return deleted breakpoint, see constant E_BP_DELETED Ad7EnumDebugErrorBreakpoints enumBp = new Ad7EnumDebugErrorBreakpoints(); enumBp.Add(new AD7DebugErrorBreakpoint(this)); ppErrorEnum = enumBp; return VSConstants.E_FAIL; } }
int IEnumDebugErrorBreakpoints2.Clone(out IEnumDebugErrorBreakpoints2 ppEnum) { Debug.WriteLine("Ad7EnumDebugErrorBreakpoints: Clone"); ppEnum = new Ad7EnumDebugErrorBreakpoints( this ); return VSConstants.S_OK; }
int IEnumDebugErrorBreakpoints2.Clone(out IEnumDebugErrorBreakpoints2 ppEnum) { Debug.WriteLine("Ad7EnumDebugErrorBreakpoints: Clone"); ppEnum = new Ad7EnumDebugErrorBreakpoints(this); return(VSConstants.S_OK); }