Esempio n. 1
0
        protected override ISingleStream <TOut> CreateOutputStream(ApplySingleArgs <TInMain, TInToApply, TOut> args)
        {
            IPushObservable <TOut> obs;

            if (args.IndexSelector == null)
            {
                obs = args.MainStream.Observable.CombineWithLatest(args.StreamToApply.Observable.First(), WrapSelectForDisposal(args.Selector, args.WithNoDispose), true);
            }
            else
            {
                obs = args.MainStream.Observable.Map((e, i) => new IndexedObject <TInMain>(i, e)).CombineWithLatest(args.StreamToApply.Observable.First(), WrapSelectIndexObjectForDisposal(args.IndexSelector, args.WithNoDispose), true);
            }
            if (args.ExcludeNull)
            {
                obs = obs.Filter(i => i != null);
            }
            return(base.CreateSingleStream(obs));
        }
Esempio n. 2
0
 public ApplySingleStreamNode(string name, ApplySingleArgs <TInMain, TInToApply, TOut> args) : base(name, args)
 {
 }