Add property changed filtering events to Configuration
This commit is contained in:
parent
5c73beff4b
commit
4725fe36d1
10 changed files with 397 additions and 194 deletions
|
|
@ -28,9 +28,9 @@ namespace LibationFileManager
|
|||
var existing = getExistingValue(propertyName);
|
||||
if (existing?.Equals(newValue) is true) return;
|
||||
|
||||
PropertyChanging?.Invoke(this, new PropertyChangingEventArgsEx(propertyName, existing, newValue));
|
||||
OnPropertyChanging(propertyName, existing, newValue);
|
||||
persistentDictionary.SetNonString(propertyName, newValue);
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgsEx(propertyName, newValue));
|
||||
OnPropertyChanged(propertyName, newValue);
|
||||
}
|
||||
|
||||
public void SetString(string newValue, [CallerMemberName] string propertyName = "")
|
||||
|
|
@ -38,9 +38,9 @@ namespace LibationFileManager
|
|||
var existing = getExistingValue(propertyName);
|
||||
if (existing?.Equals(newValue) is true) return;
|
||||
|
||||
PropertyChanging?.Invoke(this, new PropertyChangingEventArgsEx(propertyName, existing, newValue));
|
||||
OnPropertyChanging(propertyName, existing, newValue);
|
||||
persistentDictionary.SetString(propertyName, newValue);
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgsEx(propertyName, newValue));
|
||||
OnPropertyChanged(propertyName, newValue);
|
||||
}
|
||||
|
||||
private object getExistingValue(string propertyName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue