(Func<CancellationToken, ValueTask> unsubscribe, Func<TEventArgs, ValueTask> handler, Func<TEventArgs, bool>? filter = null)
| 51 | private readonly Func<TEventArgs, bool>? _filter; |
| 52 | |
| 53 | internal Subscription(Func<CancellationToken, ValueTask> unsubscribe, Func<TEventArgs, ValueTask> handler, Func<TEventArgs, bool>? filter = null) |
| 54 | { |
| 55 | _unsubscribe = unsubscribe; |
| 56 | _handler = handler; |
| 57 | _filter = filter; |
| 58 | |
| 59 | // Detach from the caller's ambient context so events dispatched over this subscription's lifetime |
| 60 | // aren't parented to whatever activity/AsyncLocal state happened to be current at subscribe time. |
| 61 | using (ExecutionContext.SuppressFlow()) |
| 62 | { |
| 63 | _dispatchTask = Task.Run(DispatchEventsAsync); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | void ISubscriptionSink.Deliver(string method, EventArgs args) |
| 68 | { |
nothing calls this directly
no outgoing calls
no test coverage detected