Arlodotexe / OwlCore

Have you ever seen an Owl do a barrel roll? Me neither. Essential supplemental tooling for .NET development.
MIT License
24 stars 3 forks source link

Feat: Resetting values in SettingsBase #4

Closed yoshiask closed 2 years ago

yoshiask commented 2 years ago

Background

This PR introduces two options for resetting a setting to its default value. Closes #3

Motivation

Resetting could previously be achieved by setting the property to null, but this did not fire PropertyChanged and could be unintuitive for consumers.

Proposal

yoshiask commented 2 years ago

@Arlodotexe Would it also help to add a method to reset all settings (clear _runtimeStorage)? Maybe that should be a separate PR, but it's still under the umbrella of "resetting values"

Arlodotexe commented 2 years ago

@Arlodotexe Would it also help to add a method to reset all settings (clear _runtimeStorage)? Maybe that should be a separate PR, but it's still under the umbrella of "resetting values"

@yoshiask Sure, we can make that part of this PR if you'd like, otherwise this looks good to me. For naming, I'm thinking something like ResetAllSettings()?

yoshiask commented 2 years ago

Yup, that name sounds good to me