From ef51192fad53220049cc4144ef90607774ad4a13 Mon Sep 17 00:00:00 2001 From: Ravi Chande Date: Mon, 23 Feb 2015 09:57:38 -0800 Subject: [PATCH] Fix up newlines --- src/VisualStudio/Core/Def/SolutionEventMonitor.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/VisualStudio/Core/Def/SolutionEventMonitor.cs b/src/VisualStudio/Core/Def/SolutionEventMonitor.cs index 2bec677fac3..192f06f21e7 100644 --- a/src/VisualStudio/Core/Def/SolutionEventMonitor.cs +++ b/src/VisualStudio/Core/Def/SolutionEventMonitor.cs @@ -13,6 +13,7 @@ internal sealed class SolutionEventMonitor : IDisposable { private GlobalOperationNotificationService _notificationService; private Dictionary _operations = new Dictionary(); + public SolutionEventMonitor(VisualStudioWorkspace workspace) { var notificationService = workspace.Services.GetService() as GlobalOperationNotificationService; @@ -20,9 +21,10 @@ public SolutionEventMonitor(VisualStudioWorkspace workspace) { _notificationService = notificationService; KnownUIContexts.SolutionBuildingContext.UIContextChanged += SolutionBuildingContextChanged; - KnownUIContexts.SolutionOpeningContext.UIContextChanged += SolutionOpeningContext_UIContextChanged; + KnownUIContexts.SolutionOpeningContext.UIContextChanged += SolutionOpeningContextChanged; } } + public void Dispose() { foreach (var globalOperation in _operations.Values) @@ -36,17 +38,20 @@ public void Dispose() { _notificationService = null; KnownUIContexts.SolutionBuildingContext.UIContextChanged -= SolutionBuildingContextChanged; + KnownUIContexts.SolutionOpeningContext.UIContextChanged -= SolutionOpeningContextChanged; } } + private void SolutionBuildingContextChanged(object sender, UIContextChangedEventArgs e) { ContextChangedWorker(e, "Solution Building"); } - private void SolutionOpeningContext_UIContextChanged(object sender, UIContextChangedEventArgs e) + private void SolutionOpeningContextChanged(object sender, UIContextChangedEventArgs e) { ContextChangedWorker(e, "Solution Opening"); } + private void ContextChangedWorker(UIContextChangedEventArgs e, string operation) { if (_notificationService != null) -- GitLab