You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no way to do this. Nevertheless, if your use case is dependent on this you can always delegate the object instance resolution during the middleware invocation (although not ideal). Something like this:
Is your request related to a problem you have?
I have a generic message handler e.g.
public class MyMessageHandler<T> : IMessageHandler<T>
.MyMessageHandler<T>
has a constructor with some parameters. e.g.public MyMessageHandler(MyOptions options)
If we register
MyOptions
in the DI container, all instances of aMyMessageHandler<T>
for differing typesT
will get the sameMyOptions
injected.It would be good to enable
MyMessageHandler<Tx>
to be injected with a different set of options toMyMessageHandler<Ty>
.Describe the solution you'd like
Open to suggestions. Perhaps something like:
Are you able to help bring it to life and contribute with a Pull Request?
No
Additional context
No response
The text was updated successfully, but these errors were encountered: