protected override void Initialize() { UIThread.CaptureSynchronizationContext(); base.Initialize(); // Subscribe to the solution events this.solutionListeners.Add(new SolutionListenerForProjectReferenceUpdate(this)); this.solutionListeners.Add(new SolutionListenerForProjectOpen(this)); this.solutionListeners.Add(new SolutionListenerForBuildDependencyUpdate(this)); this.solutionListeners.Add(new SolutionListenerForProjectEvents(this)); foreach (SolutionListener solutionListener in this.solutionListeners) { solutionListener.Init(); } }
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { await this.JoinableTaskFactory.SwitchToMainThreadAsync(); UIThread.CaptureSynchronizationContext(); await base.InitializeAsync(cancellationToken, progress).ConfigureAwait(true); // Subscribe to the solution events this.solutionListeners.Add(new SolutionListenerForProjectReferenceUpdate(this)); this.solutionListeners.Add(new SolutionListenerForProjectOpen(this)); this.solutionListeners.Add(new SolutionListenerForBuildDependencyUpdate(this)); this.solutionListeners.Add(new SolutionListenerForProjectEvents(this)); foreach (SolutionListener solutionListener in this.solutionListeners) { solutionListener.Init(); } }