Skip to content

Commit

Permalink
move dispose near ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet committed Feb 17, 2023
1 parent 8218107 commit 55bf9d3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public PublicWorkspacePullDiagnosticsHandler(
_workspaceManager.LspTextChanged += OnLspTextChanged;
}

public void Dispose()
{
_workspaceManager.LspTextChanged -= OnLspTextChanged;
_workspaceRegistrationService.LspSolutionChanged -= OnLspSolutionChanged;
}

/// <summary>
/// Public API doesn't support categories (yet).
/// </summary>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 55bf9d3

Please sign in to comment.