-
Notifications
You must be signed in to change notification settings - Fork 5k
ConfigurationBinder fails to bind class that implements IDictionary #77246
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
Tagging subscribers to this area: @dotnet/area-system-collections Issue DetailsDescriptionBinding a Configuration to a class that implements IDictionary<string,T> always results in an empty Dictionary. Reproduction Steps
Expected behaviorItems from Configuration should be added to a IDictionary implementation Actual behaviorCustom IDictionary implementation is empty Regression?Was working in Known WorkaroundsNo response ConfigurationUsed packages for Test: Other informationNo response
|
Tagging subscribers to this area: @dotnet/area-extensions-configuration Issue DetailsDescriptionBinding a Configuration to a class that implements IDictionary<string,T> always results in an empty Dictionary. Reproduction StepsSmall test class:
Expected behaviorItems from Configuration should be added to a IDictionary implementation Actual behaviorCustom IDictionary implementation is empty Regression?Was working in Known WorkaroundsNo response ConfigurationUsed packages for Test: Other informationNo response
|
fyi @SteveDunn - this looks like another regression from #68133 |
This fix will be included in the next 7.0 servicing release. #78118 |
Description
Binding a Configuration to a class that implements IDictionary<string,T> always results in an empty Dictionary.
The set function throws a System.Reflection.TargetException. I think the problem is that the setter is reflected by Dictionary and not the actual type.
Reproduction Steps
Small test class:
Expected behavior
Items from Configuration should be added to a IDictionary implementation
Actual behavior
Custom IDictionary implementation is empty
Regression?
Was working in
7.0.0-preview.7.22375.6
Known Workarounds
No response
Configuration
Used packages for Test:
Other information
No response
The text was updated successfully, but these errors were encountered: