public ObservableOrderBy(INotifyEnumerable <TItem> source, ObservingFunc <TItem, TKey> keySelector, IComparer <TKey> comparer) { if (source == null) { throw new ArgumentNullException("source"); } if (keySelector == null) { throw new ArgumentNullException("keySelector"); } this.source = source; this.keySelector = keySelector; this.searchTree = new SortedDictionary <TKey, ObservableCollection <TItem> >(comparer); this.manualRaiseSequences = new ManualObservableCollectionView <IEnumerable <TItem> >(searchTree.Values); Attach(); }
public ObservableThenBy(IOrderableNotifyEnumerable <TItem> source, ObservingFunc <TItem, TKey> keySelector, IComparer <TKey> comparer) { if (source == null) { throw new ArgumentNullException("source"); } if (keySelector == null) { throw new ArgumentNullException("keySelector"); } this.source = source; this.keySelector = keySelector; this.comparer = comparer; manualNotifier = new ManualObservableCollectionView <IEnumerable <TItem> >(SL.SelectMany(source.Sequences, sequence => searchTrees[sequence].Values)); Attach(); }
public KeyGroup() { collectionView = new ManualObservableCollectionView <TInner>(InnerKeys.Select(key => key.Tag)); }