Skip to content
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

[System] Improve ApplicationSettingsBase behavior #6272

Conversation

ermshiperete
Copy link
Contributor

@ermshiperete ermshiperete commented Dec 18, 2017

Various changes and fixes to ApplicationsSettingsBase class to improve the behaviour, in particular it implements the Upgrade method, saves serialized objects, and fires the SettingsSaving event.

This fixes Xamarin bugs #15818 and #2315.

This PR supersedes #964.

@marek-safar
Copy link
Member

build

ermshiperete and others added 5 commits December 20, 2017 08:17
This change modifies the ApplicationSettingsBaseTests so that they
store the settings files in a temporary directory. This reduces
the risk of failed tests because of stale files from previous test
run, or from a build that runs in parallel.
When calling ApplicationSettingsBase.Save() the SettingsSaving
event has to be fired.
Improve behavior of ApplicationSettingsBase class to match Windows .NET
more closely.
* Implement Upgrade to allow Upgrading of settings
* Make SettingsPropertyValue serialization work for complex objects
* Make Save and Update throw in unimplemented configurations
* Changed Reload to clear PropertyValues so they are reloaded
  and fire PropertyChanged event for all Properties
* Modified Reset to do what Reload used to do.
* Added a backup Type loading for custom SettingsProviders
* don't call SettingsSaving on Reset()
@ermshiperete ermshiperete force-pushed the bug-ApplicationSettingsBase-Xamarin-15818 branch from 95b9510 to abf0d7e Compare December 20, 2017 07:20
@marek-safar marek-safar merged commit 63a8b08 into mono:master Jan 5, 2018
akoeplinger added a commit to akoeplinger/mono that referenced this pull request Jan 5, 2018
…gsBase tests

They were set in mono#6272 but since
env vars are process wide we'd end up with non-existing paths once
the tests are done. It is safer to unset the variables after the test.
akoeplinger added a commit that referenced this pull request Jan 6, 2018
…gsBase tests (#6417)

They were set in #6272 but since
env vars are process wide we'd end up with non-existing paths once
the tests are done. It is safer to unset the variables after the test.
akoeplinger added a commit that referenced this pull request Jan 6, 2018
Otherwise we'd get a "directory not empty" exception in the
TestFixtureTearDown (which for some reason isn't shown in the log?).

This was added in #6272
@ermshiperete ermshiperete deleted the bug-ApplicationSettingsBase-Xamarin-15818 branch January 31, 2018 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants