コード例 #1
0
        public CommandController(DTE dte,
                                 Func <EventHandler, MenuCommand> initBreakOnAllCommand,
                                 IVsMonitorSelection monitorSelection,
                                 ExceptionBreakManager breakManager,
                                 IDiagnosticLogger logger)
        {
            _monitorSelection  = monitorSelection;
            _breakManager      = breakManager;
            _logger            = logger;
            _breakOnAllCommand = initBreakOnAllCommand(breakOnAllCommand_Callback);

            _requiredUiContextCookies = new HashSet <uint>(RequiredUIContexts.Select(ConvertToUIContextCookie));

            UpdateCommandAvailability();
            _selectionEventsCookie = SubscribeToSelectionEvents();

            UpdateCommandCheckedState();
            _breakManager.CurrentStateChanged += breakManager_CurrentStateChanged;

            _debugExceptionsEvents = SubscribeToDebugExceptionsCommand(dte);
        }
コード例 #2
0
        public CommandController(DTE dte,
            Func<EventHandler, MenuCommand> initBreakOnAllCommand,
            IVsMonitorSelection monitorSelection,
            ExceptionBreakManager breakManager,
            IDiagnosticLogger logger)
        {
            _monitorSelection = monitorSelection;
            _breakManager = breakManager;
            _logger = logger;
            _breakOnAllCommand = initBreakOnAllCommand(breakOnAllCommand_Callback);

            _requiredUiContextCookies = new HashSet<uint>(RequiredUIContexts.Select(ConvertToUIContextCookie));

            UpdateCommandAvailability();
            _selectionEventsCookie = SubscribeToSelectionEvents();

            UpdateCommandCheckedState();
            _breakManager.CurrentStateChanged += breakManager_CurrentStateChanged;

            _debugExceptionsEvents = SubscribeToDebugExceptionsCommand(dte);
        }
コード例 #3
0
 private void SetupExceptionBreakManager()
 {
     var versionSpecificFactory = new VersionSpecificAdapterFactory(_dte);
     var debugger = GetGlobalService(typeof (SVsShellDebugger));
     var sessionManager = new DebugSessionManager(versionSpecificFactory.AdaptDebuggerInternal(debugger), Logger);
     var optionsPage = new Lazy<OptionsPageData>(() => (OptionsPageData)GetDialogPage(typeof (OptionsPageData)));
     ExceptionBreakManager = new ExceptionBreakManager(
         sessionManager,
         name => optionsPage.Value.Ignored.Any(p => p.Matches(name)),
         Logger
     );
 }