Ideas for Registering Open Generics in ServiceCollection when they aren't "equal" #127609
Unanswered
luizfbicalho
asked this question in
Q&A
Replies: 1 comment
-
|
Looks like there is this issue #41050 that solves my problem |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an open generic registration that work fine
My point is that I have this other case
and what I wanted was to register the open generic type and resolve it
this code doesn't run at all
this one doesn't compile
the other option with a function could work, but I needed more parameters, for example receive the type that was requested, the closed generic one
or one alternative would be to have a scoped that instead of returning the factory would return the type to be constructed instead.
It could be transient in this case also
Beta Was this translation helpful? Give feedback.
All reactions