Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification handler open generic doesn't work #102

Open
rignatev opened this issue Jul 3, 2023 · 1 comment
Open

Notification handler open generic doesn't work #102

rignatev opened this issue Jul 3, 2023 · 1 comment

Comments

@rignatev
Copy link

rignatev commented Jul 3, 2023

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?

@martinothamar
Copy link
Owner

Hmm this is a weird one...

code:

var svc = app.Services.GetServices<global::Mediator.INotificationHandler<global::MediatorSandbox.App.TestNotification>>().ToArray();

.NET 7:
image

.NET 8 preview 7:
image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants