예제 #1
0
        protected override TStream CreateOutputStream(SubstractUnsortedArgs <TStream, TInLeft, TInRight, TKey> args)
        {
            var keyToExcludeHashObservable = args.RightInputStream.Observable.ToList().Map(i => new HashSet <TKey>(i.Select(j => args.GetRightKey(j)).Distinct()));
            var outObservable = args.LeftInputStream.Observable
                                .CombineWithLatest(
                keyToExcludeHashObservable,
                (l, r) => new
            {
                Value       = l,
                MustExclude = r.Contains(args.GetLeftKey(l))
            })
                                .Filter(i => !i.MustExclude)
                                .Map(i => i.Value);

            return(base.CreateMatchingStream(outObservable, args.LeftInputStream));
        }
예제 #2
0
 public SubstractUnsortedStreamNode(string name, SubstractUnsortedArgs <TStream, TInLeft, TInRight, TKey> args) : base(name, args)
 {
 }