Partager via


ILanguageClientMiddleLayer.HandleNotificationAsync Method

Definition

Intercepts JSON-RPC notification calls for methodName.

public:
 System::Threading::Tasks::Task ^ HandleNotificationAsync(System::String ^ methodName, Newtonsoft::Json::Linq::JToken ^ methodParam, Func<Newtonsoft::Json::Linq::JToken ^, System::Threading::Tasks::Task ^> ^ sendNotification);
public System.Threading.Tasks.Task HandleNotificationAsync (string methodName, Newtonsoft.Json.Linq.JToken methodParam, Func<Newtonsoft.Json.Linq.JToken,System.Threading.Tasks.Task> sendNotification);
abstract member HandleNotificationAsync : string * Newtonsoft.Json.Linq.JToken * Func<Newtonsoft.Json.Linq.JToken, System.Threading.Tasks.Task> -> System.Threading.Tasks.Task
Public Function HandleNotificationAsync (methodName As String, methodParam As JToken, sendNotification As Func(Of JToken, Task)) As Task

Parameters

methodName
String

The name of the method that is being intercepted.

methodParam
Newtonsoft.Json.Linq.JToken

Parameter to be sent for the notification.

sendNotification
Func<Newtonsoft.Json.Linq.JToken,Task>

Function delegate which will send the notification to the server. This delegate can be ignored and not invoked if the choice is to not send the notification to the server. It must be invoked in this method if the choice is to send the notification to the server.

Returns

A Task that completes once the notification has been sent.

Applies to