Пример #1
0
 public static IDisposable BindTo(this Button This, IObservable <bool> canExecute, Action action) =>
 new CompositeDisposable(
     This.OnClickAsObservable().Subscribe(_ => action()),
     canExecute.BindToInteractable(This));
Пример #2
0
 public static IDisposable BindTo(this Toggle This, IObservable <bool> canExecute, Action <bool> action) =>
 new CompositeDisposable(
     This.onValueChanged.AsObservable().Subscribe(action),
     canExecute.BindToInteractable(This));