protected override IKeyedStream <TIn, TSortingKey> CreateOutputStream(SmartDistinctSortedArgs <TIn, TSortingKey> args) { return(base.CreateKeyedStream( args.InputStream.Observable.AggregateGrouped( i => i, args.InputStream.SortDefinition.GetKey, (aggr, input) => ObjectMerger.MergeNotNull(aggr, input), (input, key, aggr) => aggr ), args.InputStream.SortDefinition )); }
protected override IStream <Correlated <TIn> > CreateOutputStream(SmartDistinctCorrelatedArgs <TIn, TGroupingKey> args) { return(base.CreateUnsortedStream(args.InputStream.Observable.Aggregate( i => new Correlated <TIn> { CorrelationKeys = new HashSet <Guid>() }, i => args.GetGroupingKey(i.Row), (aggr, input) => { aggr.Row = ObjectMerger.MergeNotNull(aggr.Row, input.Row); aggr.CorrelationKeys.UnionWith(input.CorrelationKeys); return aggr; }, (input, key, aggr) => aggr))); }
protected override IKeyedStream <Correlated <TIn>, TSortingKey> CreateOutputStream(SmartDistinctCorrelatedSortedArgs <TIn, TSortingKey> args) { return(base.CreateKeyedStream( args.InputStream.Observable.AggregateGrouped( i => new Correlated <TIn> { CorrelationKeys = new HashSet <Guid>() }, args.InputStream.SortDefinition.GetKey, (aggr, input) => { aggr.Row = ObjectMerger.MergeNotNull(aggr.Row, input.Row); aggr.CorrelationKeys.UnionWith(input.CorrelationKeys); return aggr; }, (input, key, aggr) => aggr ), args.InputStream.SortDefinition)); }
protected override IStream <TIn> CreateOutputStream(SmartDistinctArgs <TIn, TGroupingKey> args) { return(base.CreateUnsortedStream(args.InputStream.Observable.Aggregate(i => i, args.GetGroupingKey, (aggr, input) => ObjectMerger.MergeNotNull(aggr, input), (input, key, aggr) => aggr))); }