Ejemplo 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), true);
            }
            else
            {
                obs = args.MainStream.Observable.Map((e, i) => new IndexedObject <TInMain>(i, e)).CombineWithLatest(args.StreamToApply.Observable.First(), WrapSelectIndexObjectForDisposal(args.IndexSelector), true);
            }
            if (args.ExcludeNull)
            {
                obs = obs.Filter(i => i != null);
            }
            return(base.CreateSingleStream(obs));
        }
Ejemplo n.º 2
0
 public ApplySingleStreamNode(string name, ApplySingleArgs <TInMain, TInToApply, TOut> args) : base(name, args)
 {
 }