protected override IStream <Correlated <TOut> > CreateOutputStream(GroupByCorrelatedArgs <TIn, TKey, TOut> args) { if (this.ExecutionContext is GetDefinitionExecutionContext) { var inputStream = new SingleStream <Correlated <TIn> >(new SubNodeWrapper(this), PushObservable.FromSingle(default(Correlated <TIn>), null, args.Stream.Observable.CancellationToken)); var outputStream = args.SubProcess(inputStream, default); this.ExecutionContext.AddNode(this, outputStream.Observable); } var outputObservable = args.Stream.Observable.Group(i => args.GetKey(i.Row), (iS, firstElement) => args.SubProcess(new Stream <Correlated <TIn> >(new SubNodeWrapper(this), iS), firstElement.Row).Observable); return(base.CreateUnsortedStream(outputObservable)); }
public GroupByCorrelatedStreamNode(string name, GroupByCorrelatedArgs <TIn, TKey, TOut> args) : base(name, args) { }