Ejemplo n.º 1
0
        protected override ISortedStream <AggregationResult <TIn, TKey, TAggrRes>, TKey> CreateOutputStream(PivotSortedArgs <TIn, TAggrRes, TKey> args)
        {
            var aggregationProcessor = new AggregationProcessor <TIn, TIn, TAggrRes, Core.Aggregation.Aggregator <TIn> >(args.AggregationDescriptor);

            return(CreateSortedStream(
                       args.InputStream.Observable.AggregateGrouped(
                           aggregationProcessor.CreateAggregators,
                           args.InputStream.SortDefinition.GetKey,
                           aggregationProcessor.Aggregate,
                           (i, k, a) => new AggregationResult <TIn, TKey, TAggrRes>
            {
                Aggregation = aggregationProcessor.CreateInstance(a),
                FirstValue = i,
                Key = k
            }),
                       new SortDefinition <AggregationResult <TIn, TKey, TAggrRes>, TKey>(i => i.Key, args.InputStream.SortDefinition.KeyPosition)));
        }
Ejemplo n.º 2
0
 public PivotSortedStreamNode(string name, PivotSortedArgs <TIn, TAggrRes, TKey> args) : base(name, args)
 {
 }