-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Assisted inject for factory method #4448
Comments
For reference: https://stackoverflow.com/q/78966548/1237617 |
Off the top of my head,
|
You could enable this on a provider method
|
That's a fair request. I'll leave this open as a feature request for implementing an |
In the mean time, isn't a valid workaround here to define a class that uses the Still like the idea of |
Sure it's doable (as in "will work"), but the point is reducing the amount of boilerplate. I think it's not reducing boilerplate. Personally in this case I just write the MyDataServiceFactory manually. |
I have a factory method (e.g. provided by 3rd party, so I can't change it to constructor):
I would like to crate an assisted factory out of it
I don't think it's currently possible.
It seems to be this should be possible. I don't see why I should only be able to use assisted inject with constructors.
The text was updated successfully, but these errors were encountered: