Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal class GroupByOperator<TSource, TKey> : IObservable<IGroupedObservable<TKey, TSource>>
- {
- private IObservable<TSource> source;
- private Func<TSource, TKey> keySelector;
- public GroupByOperator(IObservable<TSource> source, Func<TSource, TKey> keySelector)
- {
- this.source = source;
- this.keySelector = keySelector;
- }
- public IDisposable Subscribe(IObserver<IGroupedObservable<TKey, TSource>> observer)
- {
- var grouper = new Grouper(observer, this.keySelector);
- return source.Subscribe(grouper);
- }
Add Comment
Please, Sign In to add comment