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); }
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); }
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 ); }