Skip to content

Commit e27d029

Browse files
Kapil Borledaviwil
Kapil Borle
authored andcommitted
Update RequestType parametrization
1 parent 0128d2e commit e27d029

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+156
-155
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<LaunchRequestArguments, object>(
22+
await this.SendRequest(
2323
LaunchRequest.Type,
2424
new LaunchRequestArguments {
2525
Script = scriptFilePath
2626
});
2727

28-
await this.SendRequest<object, object>(ConfigurationDoneRequest.Type, null);
28+
await this.SendRequest(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<InitializeRequestArguments, InitializeResponseBody>(
39+
return this.SendRequest(
4040
InitializeRequest.Type,
4141
new InitializeRequestArguments
4242
{

src/PowerShellEditorServices.Protocol/Client/LanguageServiceClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected override Task OnConnect()
4040
Capabilities = new ClientCapabilities()
4141
};
4242

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

src/PowerShellEditorServices.Protocol/DebugAdapter/AttachRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class AttachRequest
1111
{
1212
public static readonly
13-
RequestType<AttachRequestArguments, object> Type =
14-
RequestType<AttachRequestArguments, object>.Create("attach");
13+
RequestType<AttachRequestArguments, object, object, object> Type =
14+
RequestType<AttachRequestArguments, object, object, object>.Create("attach");
1515
}
1616

1717
public class AttachRequestArguments

src/PowerShellEditorServices.Protocol/DebugAdapter/ConfigurationDoneRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class ConfigurationDoneRequest
1111
{
1212
public static readonly
13-
RequestType<object, object> Type =
14-
RequestType<object, object>.Create("configurationDone");
13+
RequestType<object, object, object, object> Type =
14+
RequestType<object, object, object, object>.Create("configurationDone");
1515
}
1616
}

src/PowerShellEditorServices.Protocol/DebugAdapter/ContinueRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class ContinueRequest
1111
{
1212
public static readonly
13-
RequestType<object, object> Type =
14-
RequestType<object, object>.Create("continue");
13+
RequestType<object, object, object, object> Type =
14+
RequestType<object, object, object, object>.Create("continue");
1515
}
1616
}
1717

src/PowerShellEditorServices.Protocol/DebugAdapter/DisconnectRequest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
99
{
10-
public class DisconnectRequest
10+
public class DisconnectRequest
1111
{
1212
public static readonly
13-
RequestType<object, object> Type =
14-
RequestType<object, object>.Create("disconnect");
13+
RequestType<object, object, object, object> Type =
14+
RequestType<object, object, object, object>.Create("disconnect");
1515
}
1616
}
1717

src/PowerShellEditorServices.Protocol/DebugAdapter/EvaluateRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class EvaluateRequest
1111
{
1212
public static readonly
13-
RequestType<EvaluateRequestArguments, EvaluateResponseBody> Type =
14-
RequestType<EvaluateRequestArguments, EvaluateResponseBody>.Create("evaluate");
13+
RequestType<EvaluateRequestArguments, EvaluateResponseBody, object, object> Type =
14+
RequestType<EvaluateRequestArguments, EvaluateResponseBody, object, object>.Create("evaluate");
1515
}
1616

1717
public class EvaluateRequestArguments

src/PowerShellEditorServices.Protocol/DebugAdapter/InitializeRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class InitializeRequest
1111
{
1212
public static readonly
13-
RequestType<InitializeRequestArguments, InitializeResponseBody> Type =
14-
RequestType<InitializeRequestArguments, InitializeResponseBody>.Create("initialize");
13+
RequestType<InitializeRequestArguments, InitializeResponseBody, object, object> Type =
14+
RequestType<InitializeRequestArguments, InitializeResponseBody, object, object>.Create("initialize");
1515
}
1616

1717
public class InitializeRequestArguments

src/PowerShellEditorServices.Protocol/DebugAdapter/LaunchRequest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1212
public class LaunchRequest
1313
{
1414
public static readonly
15-
RequestType<LaunchRequestArguments, object> Type =
16-
RequestType<LaunchRequestArguments, object>.Create("launch");
15+
RequestType<LaunchRequestArguments, object, object, object> Type =
16+
RequestType<LaunchRequestArguments, object, object, object>.Create("launch");
1717
}
1818

1919
public class LaunchRequestArguments
@@ -36,7 +36,7 @@ public class LaunchRequestArguments
3636
public bool NoDebug { get; set; }
3737

3838
/// <summary>
39-
/// Gets or sets a boolean value that determines whether to automatically stop
39+
/// Gets or sets a boolean value that determines whether to automatically stop
4040
/// target after launch. If not specified, target does not stop.
4141
/// </summary>
4242
public bool StopOnEntry { get; set; }
@@ -53,7 +53,7 @@ public class LaunchRequestArguments
5353
public string Cwd { get; set; }
5454

5555
/// <summary>
56-
/// Gets or sets the absolute path to the runtime executable to be used.
56+
/// Gets or sets the absolute path to the runtime executable to be used.
5757
/// Default is the runtime executable on the PATH.
5858
/// </summary>
5959
public string RuntimeExecutable { get; set; }
@@ -64,7 +64,7 @@ public class LaunchRequestArguments
6464
public string[] RuntimeArgs { get; set; }
6565

6666
/// <summary>
67-
/// Gets or sets optional environment variables to pass to the debuggee. The string valued
67+
/// Gets or sets optional environment variables to pass to the debuggee. The string valued
6868
/// properties of the 'environmentVariables' are used as key/value pairs.
6969
/// </summary>
7070
public Dictionary<string, string> Env { get; set; }

src/PowerShellEditorServices.Protocol/DebugAdapter/NextRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1313
public class NextRequest
1414
{
1515
public static readonly
16-
RequestType<object, object> Type =
17-
RequestType<object, object>.Create("next");
16+
RequestType<object, object, object, object> Type =
17+
RequestType<object, object, object, object>.Create("next");
1818
}
1919
}
2020

src/PowerShellEditorServices.Protocol/DebugAdapter/PauseRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class PauseRequest
1111
{
1212
public static readonly
13-
RequestType<object, object> Type =
14-
RequestType<object, object>.Create("pause");
13+
RequestType<object, object, object, object> Type =
14+
RequestType<object, object, object, object>.Create("pause");
1515
}
1616
}
1717

src/PowerShellEditorServices.Protocol/DebugAdapter/ScopesRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1111
public class ScopesRequest
1212
{
1313
public static readonly
14-
RequestType<ScopesRequestArguments, ScopesResponseBody> Type =
15-
RequestType<ScopesRequestArguments, ScopesResponseBody>.Create("scopes");
14+
RequestType<ScopesRequestArguments, ScopesResponseBody, object, object> Type =
15+
RequestType<ScopesRequestArguments, ScopesResponseBody, object, object>.Create("scopes");
1616
}
1717

1818
[DebuggerDisplay("FrameId = {FrameId}")]

src/PowerShellEditorServices.Protocol/DebugAdapter/SetBreakpointsRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1616
public class SetBreakpointsRequest
1717
{
1818
public static readonly
19-
RequestType<SetBreakpointsRequestArguments, SetBreakpointsResponseBody> Type =
20-
RequestType<SetBreakpointsRequestArguments, SetBreakpointsResponseBody>.Create("setBreakpoints");
19+
RequestType<SetBreakpointsRequestArguments, SetBreakpointsResponseBody, object, object> Type =
20+
RequestType<SetBreakpointsRequestArguments, SetBreakpointsResponseBody, object, object>.Create("setBreakpoints");
2121
}
2222

2323
public class SetBreakpointsRequestArguments

src/PowerShellEditorServices.Protocol/DebugAdapter/SetExceptionBreakpointsRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1414
public class SetExceptionBreakpointsRequest
1515
{
1616
public static readonly
17-
RequestType<SetExceptionBreakpointsRequestArguments, object> Type =
18-
RequestType<SetExceptionBreakpointsRequestArguments, object>.Create("setExceptionBreakpoints");
17+
RequestType<SetExceptionBreakpointsRequestArguments, object, object, object> Type =
18+
RequestType<SetExceptionBreakpointsRequestArguments, object, object, object>.Create("setExceptionBreakpoints");
1919
}
2020

2121
/// <summary>

src/PowerShellEditorServices.Protocol/DebugAdapter/SetFunctionBreakpointsRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class SetFunctionBreakpointsRequest
1111
{
1212
public static readonly
13-
RequestType<SetFunctionBreakpointsRequestArguments, SetBreakpointsResponseBody> Type =
14-
RequestType<SetFunctionBreakpointsRequestArguments, SetBreakpointsResponseBody>.Create("setFunctionBreakpoints");
13+
RequestType<SetFunctionBreakpointsRequestArguments, SetBreakpointsResponseBody, object, object> Type =
14+
RequestType<SetFunctionBreakpointsRequestArguments, SetBreakpointsResponseBody, object, object>.Create("setFunctionBreakpoints");
1515
}
1616

1717
public class SetFunctionBreakpointsRequestArguments

src/PowerShellEditorServices.Protocol/DebugAdapter/SetVariableRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1515
public class SetVariableRequest
1616
{
1717
public static readonly
18-
RequestType<SetVariableRequestArguments, SetVariableResponseBody> Type =
19-
RequestType<SetVariableRequestArguments, SetVariableResponseBody>.Create("setVariable");
18+
RequestType<SetVariableRequestArguments, SetVariableResponseBody, object, object> Type =
19+
RequestType<SetVariableRequestArguments, SetVariableResponseBody, object, object>.Create("setVariable");
2020
}
2121

2222
[DebuggerDisplay("VariablesReference = {VariablesReference}")]

src/PowerShellEditorServices.Protocol/DebugAdapter/SourceRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class SourceRequest
1111
{
1212
public static readonly
13-
RequestType<SourceRequestArguments, SourceResponseBody> Type =
14-
RequestType<SourceRequestArguments, SourceResponseBody>.Create("source");
13+
RequestType<SourceRequestArguments, SourceResponseBody, object, object> Type =
14+
RequestType<SourceRequestArguments, SourceResponseBody, object, object>.Create("source");
1515
}
1616

1717
public class SourceRequestArguments

src/PowerShellEditorServices.Protocol/DebugAdapter/StackTraceRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1111
public class StackTraceRequest
1212
{
1313
public static readonly
14-
RequestType<StackTraceRequestArguments, StackTraceResponseBody> Type =
15-
RequestType<StackTraceRequestArguments, StackTraceResponseBody>.Create("stackTrace");
14+
RequestType<StackTraceRequestArguments, StackTraceResponseBody, object, object> Type =
15+
RequestType<StackTraceRequestArguments, StackTraceResponseBody, object, object>.Create("stackTrace");
1616
}
1717

1818
[DebuggerDisplay("ThreadId = {ThreadId}, Levels = {Levels}")]

src/PowerShellEditorServices.Protocol/DebugAdapter/StepInRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class StepInRequest
1111
{
1212
public static readonly
13-
RequestType<object, object> Type =
14-
RequestType<object, object>.Create("stepIn");
13+
RequestType<object, object, object, object> Type =
14+
RequestType<object, object, object, object>.Create("stepIn");
1515
}
1616
}
1717

src/PowerShellEditorServices.Protocol/DebugAdapter/StepOutRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class StepOutRequest
1111
{
1212
public static readonly
13-
RequestType<object, object> Type =
14-
RequestType<object, object>.Create("stepOut");
13+
RequestType<object, object, object, object> Type =
14+
RequestType<object, object, object, object>.Create("stepOut");
1515
}
1616
}

src/PowerShellEditorServices.Protocol/DebugAdapter/ThreadsRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1010
public class ThreadsRequest
1111
{
1212
public static readonly
13-
RequestType<object, ThreadsResponseBody> Type =
14-
RequestType<object, ThreadsResponseBody>.Create("threads");
13+
RequestType<object, ThreadsResponseBody, object, object> Type =
14+
RequestType<object, ThreadsResponseBody, object, object>.Create("threads");
1515
}
1616

1717
public class ThreadsResponseBody

src/PowerShellEditorServices.Protocol/DebugAdapter/VariablesRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
1111
public class VariablesRequest
1212
{
1313
public static readonly
14-
RequestType<VariablesRequestArguments, VariablesResponseBody> Type =
15-
RequestType<VariablesRequestArguments, VariablesResponseBody>.Create("variables");
14+
RequestType<VariablesRequestArguments, VariablesResponseBody, object, object> Type =
15+
RequestType<VariablesRequestArguments, VariablesResponseBody, object, object>.Create("variables");
1616
}
1717

1818
[DebuggerDisplay("VariablesReference = {VariablesReference}")]

src/PowerShellEditorServices.Protocol/LanguageServer/CodeAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
66
public class CodeActionRequest
77
{
88
public static readonly
9-
RequestType<CodeActionParams, CodeActionCommand[]> Type =
10-
RequestType<CodeActionParams, CodeActionCommand[]>.Create("textDocument/codeAction");
9+
RequestType<CodeActionParams, CodeActionCommand[], object, object> Type =
10+
RequestType<CodeActionParams, CodeActionCommand[], object, object>.Create("textDocument/codeAction");
1111
}
1212

1313
/// <summary>

src/PowerShellEditorServices.Protocol/LanguageServer/Completion.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
1111
public class CompletionRequest
1212
{
1313
public static readonly
14-
RequestType<TextDocumentPosition, CompletionItem[]> Type =
15-
RequestType<TextDocumentPosition, CompletionItem[]>.Create("textDocument/completion");
14+
RequestType<TextDocumentPosition, CompletionItem[], object, object> Type =
15+
RequestType<TextDocumentPosition, CompletionItem[], object, object>.Create("textDocument/completion");
1616
}
1717

1818
public class CompletionResolveRequest
1919
{
2020
public static readonly
21-
RequestType<CompletionItem, CompletionItem> Type =
22-
RequestType<CompletionItem, CompletionItem>.Create("completionItem/resolve");
21+
RequestType<CompletionItem, CompletionItem, object, object> Type =
22+
RequestType<CompletionItem, CompletionItem, object, object>.Create("completionItem/resolve");
2323
}
2424

2525
public enum CompletionItemKind

src/PowerShellEditorServices.Protocol/LanguageServer/Definition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
1010
public class DefinitionRequest
1111
{
1212
public static readonly
13-
RequestType<TextDocumentPosition, Location[]> Type =
14-
RequestType<TextDocumentPosition, Location[]>.Create("textDocument/definition");
13+
RequestType<TextDocumentPosition, Location[], object, object> Type =
14+
RequestType<TextDocumentPosition, Location[], object, object>.Create("textDocument/definition");
1515
}
1616
}
1717

src/PowerShellEditorServices.Protocol/LanguageServer/DocumentHighlight.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public class DocumentHighlight
2424
public class DocumentHighlightRequest
2525
{
2626
public static readonly
27-
RequestType<TextDocumentPositionParams, DocumentHighlight[]> Type =
28-
RequestType<TextDocumentPositionParams, DocumentHighlight[]>.Create("textDocument/documentHighlight");
27+
RequestType<TextDocumentPositionParams, DocumentHighlight[], object, object> Type =
28+
RequestType<TextDocumentPositionParams, DocumentHighlight[], object, object>.Create("textDocument/documentHighlight");
2929
}
3030
}
3131

0 commit comments

Comments
 (0)