Exemple #1
0
 public static IDisposable WhenViewModelAnyValue(this IViewFor view, Action <CompositeDisposable> block)
 {
     return(view.WhenActivated(disposable =>
     {
         view.WhenAnyValue(x => x.ViewModel).Where(x => x != null).Subscribe(_ => block.Invoke(disposable)).DisposeWith(disposable);
     }));
 }
Exemple #2
0
 public static IDisposable WhenActivated(this IViewFor This, Action <Action <IDisposable> > block)
 {
     return(This.WhenActivated(() => {
         var ret = new List <IDisposable>();
         block(ret.Add);
         return ret;
     }));
 }