示例#1
0
 void Bind(Breakpoint breakpoint)
 {
     using (var breakpointRequest = breakpoint.CreateRequest())
     {
         IDebugPendingBreakpoint2 pendingBreakpoint = null;
         _taskContext.RunOnMainThread(() => HResultChecker.Check(
                                          _debugSessionContext.DebugEngine.CreatePendingBreakpoint(
                                              breakpointRequest, out pendingBreakpoint)));
         breakpoint.PendingBreakpoint            = pendingBreakpoint;
         _pendingToBreakpoint[pendingBreakpoint] = breakpoint;
         HResultChecker.Check(pendingBreakpoint.Enable(1));
         if (pendingBreakpoint.Virtualize(1) != VSConstants.E_NOTIMPL)
         {
             throw new InvalidOperationException("VSFake should be updated to handle " +
                                                 $"{nameof(pendingBreakpoint.Virtualize)}.");
         }
         pendingBreakpoint.Bind();
     }
 }