Wrap each request in a service scope (#276)
* Wrap each request in a service scope * Change request/notification delegates to return ValueTask * Address feedback
This commit is contained in:
parent
f1cc2d81de
commit
f4c87f5e2f
1 changed files with 477 additions and 306 deletions
|
|
@ -30,7 +30,7 @@ internal sealed class RequestHandlers : Dictionary<string, Func<JsonRpcRequest,
|
|||
/// </remarks>
|
||||
public void Set<TRequest, TResponse>(
|
||||
string method,
|
||||
Func<TRequest?, CancellationToken, Task<TResponse>> handler,
|
||||
Func<TRequest?, CancellationToken, ValueTask<TResponse>> handler,
|
||||
JsonTypeInfo<TRequest> requestTypeInfo,
|
||||
JsonTypeInfo<TResponse> responseTypeInfo)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue