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

            return(CreateUnsortedStream(
                       args.InputStream.Observable.Aggregate(
                           aggregationProcessor.CreateAggregators,
                           args.GetKey,
                           aggregationProcessor.Aggregate, (i, k, a) => new AggregationResult <TIn, TKey, TAggrRes>
            {
                Aggregation = aggregationProcessor.CreateInstance(a),
                FirstValue = i,
                Key = k
            })));
        }
Exemplo n.º 2
0
 public PivotStreamNode(string name, PivotArgs <TIn, TAggrRes, TKey> args) : base(name, args)
 {
 }