private void SetBusy(ICanBeBusy model, bool isBusy)
 {
     if (model != null)
     {
         model.IsBusy = isBusy;
     }
 }
 private void SetBusy(ICanBeBusy model, bool isBusy)
 {
     if (model != null)
     {
         model.IsBusy = isBusy;
     }
 }
 public static IObservable <bool> WhenBusyAnd(this ICanBeBusy busy, IObservable <bool> predicate)
 {
     return(WhenBusy(busy).CombineLatest(predicate, (a, b) => a && b));
 }
 public static IObservable <bool> WhenBusy(this ICanBeBusy busy)
 {
     return(busy.WhenAnyValue(x => x.IsBusy));
 }
 public static IObservable <bool> WhenNotBusy(this ICanBeBusy busy)
 {
     return(busy.WhenAnyValue(x => x.IsBusy).Select(x => !x));
 }
 public static IDisposable SetBusy(this ICanBeBusy busy)
 {
     busy.IsBusy = true;
     return(Disposable.Create(() => busy.IsBusy = false));
 }