private void InitializeCommands() { SwitchCatchExceptionsOptionCommand.Initialize(this); SwitchBreakOnFailureOptionCommand.Initialize(this); SwitchParallelExecutionOptionCommand.Initialize(this); SwitchPrintTestOutputOptionCommand.Initialize(this); }
protected override void Initialize() { base.Initialize(); var componentModel = (IComponentModel)GetGlobalService(typeof(SComponentModel)); _globalRunSettings = componentModel.GetService <IGlobalRunSettingsInternal>(); _generalOptions = (GeneralOptionsDialogPage)GetDialogPage(typeof(GeneralOptionsDialogPage)); _parallelizationOptions = (ParallelizationOptionsDialogPage)GetDialogPage(typeof(ParallelizationOptionsDialogPage)); _googleTestOptions = (GoogleTestOptionsDialogPage)GetDialogPage(typeof(GoogleTestOptionsDialogPage)); _globalRunSettings.RunSettings = GetRunSettingsFromOptionPages(); _generalOptions.PropertyChanged += OptionsChanged; _parallelizationOptions.PropertyChanged += OptionsChanged; _googleTestOptions.PropertyChanged += OptionsChanged; SwitchCatchExceptionsOptionCommand.Initialize(this); SwitchBreakOnFailureOptionCommand.Initialize(this); SwitchParallelExecutionOptionCommand.Initialize(this); SwitchPrintTestOutputOptionCommand.Initialize(this); var thread = new Thread(DisplayReleaseNotesIfNecessary); thread.SetApartmentState(ApartmentState.STA); thread.Start(); }
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { await base.InitializeAsync(cancellationToken, progress); var componentModel = await GetServiceAsync(typeof(SComponentModel)) as IComponentModel; _globalRunSettings = componentModel.GetService <IGlobalRunSettingsInternal>(); await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); _generalOptions = (GeneralOptionsDialogPage)GetDialogPage(typeof(GeneralOptionsDialogPage)); _parallelizationOptions = (ParallelizationOptionsDialogPage)GetDialogPage(typeof(ParallelizationOptionsDialogPage)); _googleTestOptions = (GoogleTestOptionsDialogPage)GetDialogPage(typeof(GoogleTestOptionsDialogPage)); _globalRunSettings.RunSettings = GetRunSettingsFromOptionPages(); _generalOptions.PropertyChanged += OptionsChanged; _parallelizationOptions.PropertyChanged += OptionsChanged; _googleTestOptions.PropertyChanged += OptionsChanged; SwitchCatchExceptionsOptionCommand.Initialize(this); SwitchBreakOnFailureOptionCommand.Initialize(this); SwitchParallelExecutionOptionCommand.Initialize(this); SwitchPrintTestOutputOptionCommand.Initialize(this); DisplayReleaseNotesIfNecessary(); var logger = new ActivityLogLogger(this, () => _generalOptions.DebugMode); var debuggerAttacher = new VsDebuggerAttacher(this); _debuggerAttacherServiceHost = new DebuggerAttacherServiceHost(_debuggingNamedPipeId, debuggerAttacher, logger); try { _debuggerAttacherServiceHost.Open(); } catch (CommunicationException) { _debuggerAttacherServiceHost.Abort(); _debuggerAttacherServiceHost = null; } }
protected override void Initialize() { base.Initialize(); var componentModel = (IComponentModel)GetGlobalService(typeof(SComponentModel)); _globalRunSettings = componentModel.GetService <IGlobalRunSettingsInternal>(); _generalOptions = (GeneralOptionsDialogPage)GetDialogPage(typeof(GeneralOptionsDialogPage)); _parallelizationOptions = (ParallelizationOptionsDialogPage)GetDialogPage(typeof(ParallelizationOptionsDialogPage)); _googleTestOptions = (GoogleTestOptionsDialogPage)GetDialogPage(typeof(GoogleTestOptionsDialogPage)); _globalRunSettings.RunSettings = GetRunSettingsFromOptionPages(); _generalOptions.PropertyChanged += OptionsChanged; _parallelizationOptions.PropertyChanged += OptionsChanged; _googleTestOptions.PropertyChanged += OptionsChanged; SwitchCatchExceptionsOptionCommand.Initialize(this); SwitchBreakOnFailureOptionCommand.Initialize(this); SwitchParallelExecutionOptionCommand.Initialize(this); SwitchPrintTestOutputOptionCommand.Initialize(this); DisplayReleaseNotesIfNecessary(); var logger = new ActivityLogLogger(this, () => _generalOptions.DebugMode); var debuggerAttacher = new VsDebuggerAttacher(this); _debuggerAttacherServiceHost = new DebuggerAttacherServiceHost(_debuggingNamedPipeId, debuggerAttacher, logger); try { _debuggerAttacherServiceHost.Open(); } catch (CommunicationException) { _debuggerAttacherServiceHost.Abort(); _debuggerAttacherServiceHost = null; } }
protected override void Initialize() { base.Initialize(); var componentModel = (IComponentModel)GetGlobalService(typeof(SComponentModel)); globalRunSettings = componentModel.GetService <IGlobalRunSettingsInternal>(); generalOptions = (GeneralOptionsDialogPage)GetDialogPage(typeof(GeneralOptionsDialogPage)); parallelizationOptions = (ParallelizationOptionsDialogPage)GetDialogPage(typeof(ParallelizationOptionsDialogPage)); googleTestOptions = (GoogleTestOptionsDialogPage)GetDialogPage(typeof(GoogleTestOptionsDialogPage)); globalRunSettings.RunSettings = GetRunSettingsFromOptionPages(); generalOptions.PropertyChanged += OptionsChanged; parallelizationOptions.PropertyChanged += OptionsChanged; googleTestOptions.PropertyChanged += OptionsChanged; SwitchCatchExceptionsOptionCommand.Initialize(this); SwitchBreakOnFailureOptionCommand.Initialize(this); SwitchParallelExecutionOptionCommand.Initialize(this); SwitchPrintTestOutputOptionCommand.Initialize(this); }