Intercept Reflection exceptions from AppSettingsConfigurationStore#1210
Merged
jnyrup merged 1 commit intofluentassertions:masterfrom Dec 29, 2019
Merged
Conversation
dennisdoomen
approved these changes
Dec 29, 2019
Src/FluentAssertions/Common/ConfigurationStoreExceptionInterceptor.cs
Outdated
Show resolved
Hide resolved
Some platforms throws reflection exceptions when trying to use `ConfigurationManager`. This does not fix the underlying problem of not being unable to use `ConfigurationManager`, but returns `null` instead of an exception. Relates to fluentassertions#1207 and fluentassertions#1151
8c97ed4 to
eaa952f
Compare
|
Current fix returns null for GetSettings but NullConfigurationStore returns an empty string. Seems like a more consistent fix would be to emulate NullConfigurarion store behavior. |
Member
Author
|
@SteveBush I see the inconsistency. |
|
Sorry for the delayed response. I was traveling over the holidays and could only look at code diffs on GitHub.
I have verified the changes to intercept the reflection exceptions fix FluentAssertions for my Android builds.
I also reviewed to the FluentAssertions code more closely and I understand callers to AppSettingsConfigurationStore can handle a null response.
Thanks for making the change and have a happy new year.
Steve
From: Jonas Nyrup <[email protected]>
Sent: Thursday, January 2, 2020 11:26 AM
To: fluentassertions/fluentassertions <[email protected]>
Cc: Steve Bush <[email protected]>; Mention <[email protected]>
Subject: Re: [fluentassertions/fluentassertions] Intercept Reflection exceptions from `AppSettingsConfigurationStore` (#1210)
@SteveBush<https://github.com/SteveBush> I see the inconsistency.
The code here was intentional, as AppSettingsConfigurationStore can return null.
Are having problems with the merged fix?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1210?email_source=notifications&email_token=AAVLFOVICO52KRPKK7VYPHDQ3Y5TDA5CNFSM4KA6D47KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH7E6SA#issuecomment-570314568>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAVLFOSHMR3BKKZX5VVFTKTQ3Y5TDANCNFSM4KA6D47A>.
|
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.
Some platforms throw reflection exceptions when trying to use
ConfigurationManager.This does not fix the underlying problem of not being unable to use
ConfigurationManager, but returnsnullinstead of an exception.Relates to #1207 and #1151