diff --git a/src/Features/LanguageServer/Protocol/Handler/Diagnostics/Public/PublicWorkspacePullDiagnosticsHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Diagnostics/Public/PublicWorkspacePullDiagnosticsHandler.cs index e82f721b91c0f..9855681054b0a 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Diagnostics/Public/PublicWorkspacePullDiagnosticsHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Diagnostics/Public/PublicWorkspacePullDiagnosticsHandler.cs @@ -50,6 +50,12 @@ public PublicWorkspacePullDiagnosticsHandler( _workspaceManager.LspTextChanged += OnLspTextChanged; } + public void Dispose() + { + _workspaceManager.LspTextChanged -= OnLspTextChanged; + _workspaceRegistrationService.LspSolutionChanged -= OnLspSolutionChanged; + } + /// /// Public API doesn't support categories (yet). /// @@ -169,12 +175,6 @@ protected override async Task WaitForChangesAsync(RequestContext context, Cancel return; } - public void Dispose() - { - _workspaceManager.LspTextChanged -= OnLspTextChanged; - _workspaceRegistrationService.LspSolutionChanged -= OnLspSolutionChanged; - } - internal TestAccessor GetTestAccessor() => new(this); internal readonly struct TestAccessor