Exemple #1
0
 public static IObservableList <T> Where <T>(this IObservableList <T> self, Func <T, IObservable <bool> > predicate)
 {
     return(self
            .Select(item => predicate(item).Select(p => new { Item = item, Pred = p }))
            .Switch()
            .Where(x => x.Pred)
            .Select(x => x.Item));
 }
Exemple #2
0
 public static IObservableList <TResult> SelectMany <TSource, TResult>(
     this IObservableList <TSource> self,
     Func <TSource, IObservableList <TResult> > selector)
 {
     return(self.Select(selector).Join());
 }
Exemple #3
0
 public static IObservableList <TResult> Select <TSource, TResult>(
     this IObservableList <TSource> self,
     Func <TSource, TResult> selector)
 {
     return(self.Select(change => change.Select(selector)).UnsafeAsObservableList());
 }