private void ParentContainer_SettingChanged(object sender, SettingChangeEventArgs e) { if (e.Key.StartsWith(KeyPrefix)) { var rawKey = e.Key.Substring(KeyPrefix.Length); SettingChanging?.Invoke(this, new SettingChangeEventArgs(Tag, rawKey, e.OldValue, e.NewValue)); } }
public void Set <T>(string key, T value) { SetValue( value, actBeforeChange: (oldValue, newValue) => { SettingChanging?.Invoke(this, new SettingChangeEventArgs(Tag, key, oldValue, newValue)); }, actAfterChange: (oldValue, newValue) => { SettingChanged?.Invoke(this, new SettingChangeEventArgs(Tag, key, oldValue, newValue)); }, propertyName: key); }
protected virtual void OnSettingChanging(SettingChangingEventArgs e) { SettingChanging?.Invoke(this, e); }
private void SettingChangingHandler(object sender, SettingChangingEventArgs e) { SettingChanging?.Invoke(sender, e); }