Skip to content

Commit 0723cce

Browse files
Kapil Borledaviwil
Kapil Borle
authored andcommitted
Parameterize calls to sendrequest
1 parent 66c6485 commit 0723cce

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/PowerShellEditorServices.Protocol/Client/DebugAdapterClientBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ public DebugAdapterClient(ChannelBase clientChannel)
1919

2020
public async Task LaunchScript(string scriptFilePath)
2121
{
22-
await this.SendRequest(
22+
await this.SendRequest<LaunchRequestArguments, object>(
2323
LaunchRequest.Type,
2424
new LaunchRequestArguments {
2525
Script = scriptFilePath
2626
});
2727

28-
await this.SendRequest(ConfigurationDoneRequest.Type, null);
28+
await this.SendRequest<object, object>(ConfigurationDoneRequest.Type, null);
2929
}
3030

3131
protected override Task OnStart()
@@ -36,7 +36,7 @@ protected override Task OnStart()
3636
protected override Task OnConnect()
3737
{
3838
// Initialize the debug adapter
39-
return this.SendRequest(
39+
return this.SendRequest<InitializeRequestArguments, InitializeResponseBody>(
4040
InitializeRequest.Type,
4141
new InitializeRequestArguments
4242
{

src/PowerShellEditorServices.Protocol/Client/LanguageClientBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected override Task OnStart()
3434
protected override async Task OnStop()
3535
{
3636
// First, notify the language server that we're stopping
37-
var response = await this.SendRequest(ShutdownRequest.Type, new object());
37+
var response = await this.SendRequest<object, object, object>(ShutdownRequest.Type);
3838
await this.SendEvent(ExitNotification.Type, new object());
3939
}
4040

src/PowerShellEditorServices.Protocol/Client/LanguageServiceClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ protected override Task OnConnect()
4040
Capabilities = new ClientCapabilities()
4141
};
4242

43-
return this.SendRequest(
44-
InitializeRequest.Type,
43+
return this.SendRequest<InitializeRequest, InitializeResult>(
44+
InitializeRequest.Type,
4545
initializeRequest);
4646
}
4747

test/PowerShellEditorServices.Test.Host/ServerTestsBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected Task<TResult> SendRequest<TParams, TResult>(
139139
TParams requestParams)
140140
{
141141
return
142-
this.protocolClient.SendRequest(
142+
this.protocolClient.SendRequest<TParams, TResult>(
143143
requestType,
144144
requestParams);
145145
}

0 commit comments

Comments
 (0)