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
|
|
@ -69,5 +69,5 @@ public interface IMcpEndpoint : IAsyncDisposable
|
|||
/// <param name="method">The notification method.</param>
|
||||
/// <param name="handler">The handler to be invoked.</param>
|
||||
/// <returns>An <see cref="IDisposable"/> that will remove the registered handler when disposed.</returns>
|
||||
IAsyncDisposable RegisterNotificationHandler(string method, Func<JsonRpcNotification, CancellationToken, Task> handler);
|
||||
IAsyncDisposable RegisterNotificationHandler(string method, Func<JsonRpcNotification, CancellationToken, ValueTask> handler);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue