Skip to content

Commit ebe2180

Browse files
committed
Convert PsesConfigurationHandler to inherit DidChangeConfigurationHandlerBase
Except for `TelemetryEventParams` changes, saving for later.
1 parent 01366bb commit ebe2180

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@
2222

2323
namespace Microsoft.PowerShell.EditorServices.Handlers
2424
{
25-
internal class PsesConfigurationHandler : IDidChangeConfigurationHandler
25+
internal class PsesConfigurationHandler : DidChangeConfigurationHandlerBase
2626
{
2727
private readonly ILogger _logger;
2828
private readonly WorkspaceService _workspaceService;
2929
private readonly ConfigurationService _configurationService;
3030
private readonly PowerShellContextService _powerShellContextService;
3131
private readonly ILanguageServerFacade _languageServer;
32-
private DidChangeConfigurationCapability _capability;
3332
private bool _profilesLoaded;
3433
private bool _consoleReplStarted;
3534
private bool _cwdSet;
@@ -50,12 +49,7 @@ public PsesConfigurationHandler(
5049
ConfigurationUpdated += analysisService.OnConfigurationUpdated;
5150
}
5251

53-
public object GetRegistrationOptions()
54-
{
55-
return null;
56-
}
57-
58-
public async Task<Unit> Handle(DidChangeConfigurationParams request, CancellationToken cancellationToken)
52+
public override async Task<Unit> Handle(DidChangeConfigurationParams request, CancellationToken cancellationToken)
5953
{
6054
LanguageServerSettingsWrapper incomingSettings = request.Settings.ToObject<LanguageServerSettingsWrapper>();
6155
if(incomingSettings == null)
@@ -207,11 +201,6 @@ private void SendFeatureChangesTelemetry(LanguageServerSettingsWrapper incomingS
207201
});
208202
}
209203

210-
public void SetCapability(DidChangeConfigurationCapability capability)
211-
{
212-
_capability = capability;
213-
}
214-
215204
public event EventHandler<LanguageServerSettings> ConfigurationUpdated;
216205
}
217206
}

0 commit comments

Comments
 (0)