コード例 #1
0
        protected override IStream <TOut> CreateOutputStream(LookupArgs <TInLeft, TInRight, TOut, TKey> args)
        {
            var rightDicoS = args.RightInputStream.Observable.ToList().Map(l => l.Select(i => new { Key = args.GetRightStreamKey(i), Value = i }).Where(i => i.Key != null).ToDictionary(i => i.Key, i => i.Value));
            var matchingS  = args.LeftInputStream.Observable.CombineWithLatest(rightDicoS, (l, rl) => new { Left = l, Right = this.HandleMatching(l, rl, args.GetLeftStreamKey) }, true);

            return(base.CreateUnsortedStream(matchingS.Map(i => args.ResultSelector(i.Left, i.Right))));
        }
コード例 #2
0
 public LookupStreamNode(string name, LookupArgs <TInLeft, TInRight, TOut, TKey> args) : base(name, args)
 {
 }