Minimumlevel partial fix with IConfigurationRoot.Providers - #233
Merged
Conversation
A partial fix for minimumlevel not being correctly overriden by higher priority providers.
sungam3r
reviewed
Aug 28, 2020
| #if NETSTANDARD || NET461 | ||
| _configurationRoot = configuration as IConfigurationRoot; | ||
| #endif | ||
|
|
sungam3r
reviewed
Aug 28, 2020
| #endif //NET451 or fallback | ||
|
|
||
| return minimumLevelDirective.Value != null ? minimumLevelDirective : minimumLevelDirective.GetSection("Default"); | ||
|
|
Member
|
Thanks! 👍 As it's a slightly tricky scenario, it would be great to have a test for this behavior, so we can lessen the risk of regression in the future. |
Added unit tests.
Author
|
I realise the long lines are less than desirable, but I don't know how to break them up properly wihout without taking up too much vertical space. :( |
Member
|
Sorry about the long delay on this; merging to the 3.5.0-dev-* version now. |
Author
|
It's ok, there are other priorities sometimes. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A partial fix for minimumlevel not being correctly overriden by higher priority providers.
The fix only works for the .NET 4.6.1+ and .NET Standard builds as the IConfigurationRoot interface did not have Providers in .NET 4.5.1.
I understand this is more of an annoyance than a real issue, but it's easy to miss.