private void Reload(object state) { notify = false; Updater(BindValue); ChangeNotifyable.GetReloadToken() .RegisterChangeCallback(Reload, null); notify = true; Reloaded?.Invoke(this); }
public void Bind() { if (isBind) { return; } if (Mode != ConfigBindMode.OneTime) { changeWatcher = new ChangeWatcher(ChangeNotifyable); } if (Mode == ConfigBindMode.OneWay || Mode == ConfigBindMode.TwoWay) { ChangeNotifyable.GetReloadToken() .RegisterChangeCallback(Reload, null); } if (Mode == ConfigBindMode.TwoWay || Mode == ConfigBindMode.OneWayToSource) { ChangeWatcher.ChangePushed += Handler; } ChangeNotifyable.Bind(BindSettings.Value); isBind = true; }
private void BindValue() { ChangeNotifyable.Bind(BindSettings.Value); }