public static IObservableCollection <T> ToObservable <T>(this IQueryableObservableCollection <T> @this) { var observable = @this as IObservableCollection <T>; System.Diagnostics.Debug.Assert(observable != null); if (observable == null) { throw new InvalidOperationException("Must implement IObservableCollection<T>"); } return(observable); }
public static IQueryableObservableCollection <T> Distinct <T>(this IQueryableObservableCollection <T> @this) { return(new DistinctObservableCollection <T>(@this.ToObservable())); }
public static IQueryableObservableCollection <T> Distinct <T>(this IQueryableObservableCollection <T> @this, IEqualityComparer <T> comparer) { return(new DistinctObservableCollection <T>(@this.ToObservable(), comparer)); }
public static IQueryableObservableCollection <T> Where <T>(this IQueryableObservableCollection <T> @this, Func <T, int, bool> predicate) { throw new NotImplementedException(); }
public static IQueryableObservableCollection <T> Where <T>(this IQueryableObservableCollection <T> @this, Func <T, bool> predicate) { return(new FilteredObservableCollection <T>(@this.ToObservable(), item => predicate(item))); }
public static IQueryableObservableCollection <TResult> Select <T, TResult>(this IQueryableObservableCollection <T> @this, Func <T, TResult> selector) { return(new ProjectedObservableCollection <T, TResult>(@this.ToObservable(), selector)); }
public static IQueryableObservableCollection <TResult> Select <T, TResult>(this IQueryableObservableCollection <T> @this, Func <T, int, TResult> selector) { throw new NotImplementedException(); }
public static IOrderedQueryableObservableCollection <TSource> OrderByDescending <TSource, TKey>(this IQueryableObservableCollection <TSource> @this, Func <TSource, TKey> keySelector, IComparer <TKey> comparer) { return(new SortedObservableCollection <TSource, TKey>(@this.ToObservable(), keySelector, comparer, true)); }
public static IOrderedQueryableObservableCollection <TSource> OrderBy <TSource, TKey>(this IQueryableObservableCollection <TSource> @this, Func <TSource, TKey> keySelector) { return(new SortedObservableCollection <TSource, TKey>(@this.ToObservable(), keySelector, false)); }