Beispiel #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));
 }
Beispiel #2
0
 public static IObservableList <TResult> SelectMany <TSource, TResult>(
     this IObservableList <TSource> self,
     Func <TSource, IObservableList <TResult> > selector)
 {
     return(self.Select(selector).Join());
 }
Beispiel #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());
 }