예제 #1
0
        protected override IStream <TIn> CreateOutputStream(SelectSectionArgs <TIn> args)
        {
            IPushObservable <TIn> obs;

            if (args.InitialState == null)
            {
                if (args.SwitchToIgnore == null)
                {
                    obs = args.Stream.Observable.FilterSection(args.SwitchToKeep);
                }
                else
                {
                    obs = args.Stream.Observable.FilterSection(args.SwitchToKeep, args.SwitchToIgnore);
                }
            }
            else
            {
                if (args.SwitchToIgnore == null)
                {
                    obs = args.Stream.Observable.FilterSection(args.InitialState.Value, args.SwitchToKeep);
                }
                else
                {
                    obs = args.Stream.Observable.FilterSection(args.InitialState.Value, args.SwitchToKeep, args.SwitchToIgnore);
                }
            }
            return(base.CreateUnsortedStream(obs));
        }
예제 #2
0
 public SelectSectionStreamNode(string name, SelectSectionArgs <TIn> args) : base(name, args)
 {
 }