-
Notifications
You must be signed in to change notification settings - Fork 456
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
Inline dependencies aren't propagated by CollectionResolver #561
Comments
@dvdwouwe I see the value in this. Is there any way this could break existing implementations? Do you think there a reason why the original implementation did not pass this? |
I fixed the original implementation in the class CollectionResolver, by passing the context.AdditionalParameters:
I don't think this change it has any impact , because:
So, in the default mode context.AdditionalArguments is null, so there is no difference. Only if we use the possibility to pass parent context we need this fix. |
Thanks @dvdwouwe, apologies for the slow response. Merged. |
If you change the behavior of the DefaultKernel to propagate inline dependencies, all sub-resolvers should pass the AdditionalArguments from their CreationContext.
I will create a PR for this, with a unit-test that confirms the behavior.
PS
This will affect implicitly the code for .Net Core 3.1 / 5.0, because there is a class called RegisteredCollectionResolver. The registering of this class can't be easily undone with the current code-base.
The text was updated successfully, but these errors were encountered: