Example #1
0
 private void Reload(object state)
 {
     notify = false;
     Updater(BindValue);
     ChangeNotifyable.GetReloadToken()
     .RegisterChangeCallback(Reload, null);
     notify = true;
     Reloaded?.Invoke(this);
 }
Example #2
0
 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;
 }
Example #3
0
 private void BindValue()
 {
     ChangeNotifyable.Bind(BindSettings.Value);
 }