Ejemplo n.º 1
0
 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
                ));
 }
Ejemplo n.º 2
0
 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)));
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
0
 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)));
 }