Exemple #1
0
        protected override IStream <TOut> CreateOutputStream(WithPreviousArgs <TIn, TOut> args)
        {
            var obs = args.Stream.Observable
                      .Scan <TIn, (FixedQueue <TIn> Queue, TIn[] Items)>((new FixedQueue <TIn>(args.Count), new TIn[] { }), (a, v) =>
            {
                a.Queue.Enqueue(v);
                return(a.Queue, a.Queue.ToArray().Reverse().ToArray());
            })
                      .Map(i => args.GetResult(i.Items));

            return(base.CreateUnsortedStream(obs));
        }
Exemple #2
0
 public WithPreviousStreamNode(string name, WithPreviousArgs <TIn, TOut> args) : base(name, args)
 {
 }