Mediator
Mediator copied to clipboard
Notification handler open generic doesn't work
Hi! I was testing the notification handlers and found a problem. When I use a notification handler open generic it doesn't work. Another notification handler is called twice instead.
Example code https://github.com/rignatev/MediatorSandbox.
Did I miss something?
Hmm this is a weird one...
code:
var svc = app.Services.GetServices<global::Mediator.INotificationHandler<global::MediatorSandbox.App.TestNotification>>().ToArray();
.NET 7:
.NET 8 preview 7:
Is there a bug in DI for .NET 7 that I've missed? The DI registration code looks correct as far as I can tell
I think this was a .NET bug actually. I have not seen this since. Closing for now