コード例 #1
0
        public int CanBind(out IEnumDebugErrorBreakpoints2 errorBreakpointsEnum)
        {
            errorBreakpointsEnum = null;
            if (_deleted)
            {
                return(AD7Constants.E_BP_DELETED);
            }

            bool notDataStringLocation = _requestInfo.bpLocation.bpLocationType !=
                                         (uint)enum_BP_LOCATION_TYPE.BPLT_DATA_STRING;

            bool conditionalWhenChangedBp =
                (_requestInfo.dwFields & enum_BPREQI_FIELDS.BPREQI_CONDITION) != 0 &&
                _requestInfo.bpCondition.styleCondition == enum_BP_COND_STYLE.BP_COND_WHEN_CHANGED;

            if (notDataStringLocation || conditionalWhenChangedBp)
            {
                IDebugErrorBreakpoint2[] breakpointErrors = new IDebugErrorBreakpoint2[1];
                breakpointErrors[0] = new DebugBreakpointError(
                    Self, enum_BP_ERROR_TYPE.BPET_GENERAL_WARNING, _watchpointNotSupported);
                errorBreakpointsEnum = _breakpointErrorEnumFactory.Create(breakpointErrors);
                return(VSConstants.S_FALSE);
            }
            return(VSConstants.S_OK);
        }
コード例 #2
0
        public int CanBind(out IEnumDebugErrorBreakpoints2 errorBreakpointsEnum)
        {
            errorBreakpointsEnum = null;
            if (_deleted)
            {
                return(AD7Constants.E_BP_DELETED);
            }

            // Check the breakpoint type, and make sure it's supported.
            if (IsSupportedType())
            {
                return(VSConstants.S_OK);
            }

            var breakpointErrors = new IDebugErrorBreakpoint2[1];

            breakpointErrors[0] = new DebugBreakpointError(
                Self, enum_BP_ERROR_TYPE.BPET_GENERAL_WARNING, _breakpointNotSupported);
            errorBreakpointsEnum = _breakpointErrorEnumFactory.Create(breakpointErrors);
            return(VSConstants.S_FALSE);
        }