(string method, EventArgs args)
| 45 | } |
| 46 | |
| 47 | void ISubscriptionSink.Deliver(string method, EventArgs args) |
| 48 | { |
| 49 | if (args is not TEventArgs typed) |
| 50 | { |
| 51 | throw new InvalidOperationException($"Cannot deliver '{args.GetType()}' to stream expecting '{typeof(TEventArgs)}'."); |
| 52 | } |
| 53 | |
| 54 | if (_filter is { } f && !f(typed)) return; |
| 55 | |
| 56 | _channel.Writer.TryWrite((method, typed)); |
| 57 | } |
| 58 | |
| 59 | void ISubscriptionSink.Complete(Exception? error) |
| 60 | { |
no test coverage detected