Skip to content

Conversation

@gentledepp
Copy link

my first try to implement #223.

This only handles INotificationHandler<> registrations.

You can register your INotificationHandler<> as

  • custom type services.AddXY<INotificationHandler<N>,MyNotificationHandler>
  • instance services.AddXY<INotificationHandler<N>>(new MyNotificationHandler())
  • but unfortunately not as factory services.AddXY<INotificationHandler<N>>(_ => new MyNotificationHandler())

The reason is, that by having the ServiceDescriptor with the ImplementationFactory, I have no way to find out the concreat implementation type.

Now the same way, this could be implemented for the other handlers too.

What do you think? @martinothamar @janoveh
Shall I provide a PR?

@gentledepp gentledepp force-pushed the feature/223_customresgistration branch from bfa6bb2 to 7dded57 Compare September 5, 2025 05:08
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

Successfully merging this pull request may close these issues.

1 participant