protected override IStream <TOut> CreateOutputStream(ApplyArgs <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.CreateUnsortedStream(obs)); }
public ApplyStreamNode(string name, ApplyArgs <TInMain, TInToApply, TOut> args) : base(name, args) { }