public ReadonlyObservableBag(ObservableConcurrentBag <T> originalCollection, Func <T, bool> predicate) { _originalCollection = originalCollection; _predicate = predicate; originalCollection.CollectionChanged += OriginalCollection_CollectionChanged; }
public static ReadonlyObservableBag <T> Select <T>(this ObservableConcurrentBag <T> collection, Func <T, bool> predicate) { return(new ReadonlyObservableBag <T>(collection, predicate)); }