ILanguageClientMiddleLayer.HandleRequestAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Intercepts JSON-RPC request calls for methodName
.
public:
System::Threading::Tasks::Task<Newtonsoft::Json::Linq::JToken ^> ^ HandleRequestAsync(System::String ^ methodName, Newtonsoft::Json::Linq::JToken ^ methodParam, Func<Newtonsoft::Json::Linq::JToken ^, System::Threading::Tasks::Task<Newtonsoft::Json::Linq::JToken ^> ^> ^ sendRequest);
public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> HandleRequestAsync (string methodName, Newtonsoft.Json.Linq.JToken methodParam, Func<Newtonsoft.Json.Linq.JToken,System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>> sendRequest);
public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken?> HandleRequestAsync (string methodName, Newtonsoft.Json.Linq.JToken methodParam, Func<Newtonsoft.Json.Linq.JToken,System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken?>> sendRequest);
abstract member HandleRequestAsync : string * Newtonsoft.Json.Linq.JToken * Func<Newtonsoft.Json.Linq.JToken, System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>> -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function HandleRequestAsync (methodName As String, methodParam As JToken, sendRequest As Func(Of JToken, Task(Of JToken))) As Task(Of JToken)
Parameters
- methodName
- String
The name of the method that is being intercepted.
- methodParam
- Newtonsoft.Json.Linq.JToken
Parameter to be sent for the request.
Function delegate which will send the request to the server. This delegate can be ignored and not invoked if the choice is to not send the request to the server. It must be invoked in this method if the choice is to send the request to the server.
Returns
A Newtonsoft.Json.Linq.JToken corresponding to a valid response for the given method.