-
-
Notifications
You must be signed in to change notification settings - Fork 70
Resolve combinations of built in types #72
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
Comments
The container should be able to resolve chain of generics like this: |
The solutions break existing strategies. Please consider adding a default null for the additional parameters. This is the second breaking API in the 5.x branch. |
Would be more productive if you could provide more context or a sample of what you are talking about. Where would you like me to add null? I know a lot of Unity bugs became 'features' and there are solutions to work around them. If you want to stay with these solutions, just do not upgrade. |
The following would allow anything using these public methods to continue using them without breaking the packages. (I.E. I can upgrade to the latest even if I have a 3rd dependency that is calling the single param constructor) public ArrayResolveStrategy(MethodInfo method, MethodInfo lazy) => public ArrayResolveStrategy(MethodInfo method, MethodInfo lazy = null) public ArrayResolveStrategy(MethodInfo method, MethodInfo lazy) => public ArrayResolveStrategy(MethodInfo method, MethodInfo lazy = null) public EnumerableResolveStrategy(MethodInfo method, MethodInfo lazy) => public EnumerableResolveStrategy(MethodInfo method, MethodInfo lazy = null) |
Unfortunately adding null would not solve the issue. It has to be provided now. |
looks like this also broke some working aspnet core applications Here is everything that I could find on it. I think what you describe here is exactly the problem
maybe we need a way to disable this behavior @ENikS ? |
Rethinking, the feature is ok. no need for disabling. It must be a bug that GetFinalType returns IdentityServerOptions when resovling IEnumerable<IPostConfigureOptions> |
Would you accept a PR that changes this according to comment below?
|
Problem
Unity supports IEnumerable, Array, and Lazy. Theoretically it should be able to distinguish these types:
The text was updated successfully, but these errors were encountered: