Method Subscribe
- Namespace
- Oscova.Agents.Notifications
- Assembly
- Oscova.Agents.dll
Subscribe(string, Func<T, Task>)
Subscribes a handler to notifications for one user.
public IDisposable Subscribe(string userId, Func<T, Task> handler)Parameters
userIdstring-
The user whose notifications should be received.
handlerFunc<T, Task>-
The asynchronous callback to invoke for matching notifications.
Returns
- IDisposable
-
A disposable subscription that removes the handler.