/// <summary> /// Bind an event listener which passes the current value. /// <param name="callNow">If true, call just this listener with the current value of the SmartVar.</param> /// <returns>IRelayBinding for easy enabling/disabling, or null if failed.</returns> public IRelayBinding BindListener(System.Action <TData> listener, bool callNow = false) { IRelayBinding result = relay.BindListener(listener); if (callNow) { listener(value); } return(result); }
public override void SetOwner(SmartBindableBase owner) { this._owner = (SmartEvent.Data.EventVar)owner; _onDispatchBinding = this._owner.BindListener(OnDispatched); }