Beispiel #1
0
        public void Start(IObservable <T1> source)
        {
            BaseSubject <T1> subject = (BaseSubject <T1>)source;

            this.subject = subject;
            var observer =
                new Observer <T1>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => { });

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #2
0
        public TimestampedSubject(IObservable <T> source)
        {
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #3
0
        public CountSubject(IObservable <T> source)
        {
            this.source = source;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    localvalue => InnerExecute(localvalue),
                    ex => NotifyErrorObservers(ex),
                    () => InnerComplete());

            this.subscriped = subject.ColdSubscribe(observer);
        }
        public MinSubjectSubjectInt(IObservable <int> source)
        {
            this.source = source;
            BaseSubject <int> subject = (BaseSubject <int>)source;

            this.subject = subject;
            var observer =
                new Observer <int>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => InnerComplete());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #5
0
        public ScanSubject(IObservable <T> source, Func <T, T, T> accumulator)
        {
            this.source      = source;
            this.accumulator = accumulator;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #6
0
        public LookupSubject(IObservable <T> source, Func <T, TKey> keySelector)
        {
            this.source      = source;
            this.keySelector = keySelector;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #7
0
        private ObserveOnSubject(IObservable <T> source)
        {
            base.Scheduler = new CurrentThreadScheduler();
            this.source    = source;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #8
0
        public WhereSubject(IObservable <T> source, Predicate <T> predicate)
        {
            this.source    = source;
            this.predicate = predicate;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #9
0
        public DoSubject(IObservable <T> source, Action <T> action)
        {
            this.source = source;
            this.action = action;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #10
0
        public SelectManySubject(IObservable <T> source, Func <T, IEnumerable <TResult> > selector)
        {
            this.source   = source;
            this.selector = selector;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #11
0
        public FinallySubject(IObservable <T> source, Action action)
        {
            this.source = source;
            this.action = action;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => InnerError(ex),
                    () => InnerComplete());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #12
0
        public AllSubject(IObservable <T> source, Func <T, bool> predicate)
        {
            this.source    = source;
            this.predicate = predicate;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => { });

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #13
0
        public ElementAtSubject(IObservable <T> source, int index)
        {
            this.source = source;
            this.index  = index;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #14
0
        public CatchSubject(IObservable <T> firstsource, IObservable <T> secondsource)
        {
            this.firstsource  = firstsource;
            this.secondsource = secondsource;
            BaseSubject <T> firstsubject = (BaseSubject <T>)firstsource;

            this.firstsubject = firstsubject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => ErrorExecute(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = firstsubject.ColdSubscribe(observer);
        }
Beispiel #15
0
        public GroupBySubSubject(IObservable <T> source, TKey key)
        {
            this.source = source;
            this.key    = key;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    localvalue => InnerExecute(localvalue),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #16
0
        public StartWithSubject(IObservable <T> source, T[] values)
        {
            this.source = source;
            this.values = values;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #17
0
        public AggregateSubject(IObservable <T> source, Func <T, T, T> accumulator)
        {
            this.Scheduler   = new CurrentThreadScheduler();
            this.source      = source;
            this.accumulator = accumulator;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => { OnCompleted(); });

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #18
0
        public ZipSubject(IObservable <TFirst> first, IEnumerable <TSecond> second, Func <TFirst, TSecond, TResult> resultSelector)
        {
            this.first          = first;
            this.second         = second;
            this.resultSelector = resultSelector;
            BaseSubject <TFirst> subject = (BaseSubject <TFirst>)first;

            this.subject = subject;
            var observer =
                new Observer <TFirst>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => NotifyCompleteObservers());

            this.subscriped = subject.ColdSubscribe(observer);
        }
Beispiel #19
0
        public TransformSubject(IObservable <T> source, Func <T, T> transform)
        {
            this.Scheduler = new CurrentThreadScheduler();
            this.source    = source;
            this.transform = transform;
            BaseSubject <T> subject = (BaseSubject <T>)source;

            this.subject = subject;
            var observer =
                new Observer <T>(
                    value => InnerExecute(value),
                    ex => NotifyErrorObservers(ex),
                    () => { OnCompleted(); });

            this.subscriped = subject.ColdSubscribe(observer);
        }