Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ClientRequiresNamedArguments option for IProgress<T> notifications #733

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Nov 4, 2021

An individual method or entire RPC target object may have this new option applied to get named arguments syntax used for callbacks (e.g. IProgress<T>.Report notifications).

This is useful for when the RPC client is LSP, which requires named arguments in the $/progress notification.
An LSP server that wishes to opt into this new behavior should add the RPC target option with an additional option:

 rpc.AddLocalRpcTarget(
   this.server,
   new JsonRpcTargetOptions
   {
     UseSingleObjectParameterDeserialization = true,
+    ClientRequiresNamedArguments = true,
   })

An individual method or entire RPC target object may have this new option applied to get named arguments syntax used for callbacks (e.g. `IProgress<T>.Report` notifications).

This is useful for when the RPC client is LSP, which requires named arguments in the `$/progress` notification.
@AArnott AArnott added this to the v2.10 milestone Nov 4, 2021
@AArnott AArnott changed the title Add ClientRequiresNamedArguments option Add ClientRequiresNamedArguments option for IProgress<T> notifications Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants