Ejemplo n.º 1
0
            protected override IEnumerable <ISubscription> OnSubscribe()
            {
                var firstObserver = new FirstObserver(this);
                var otherObserver = new OtherObserver(this);

                var firstSubscription = Params._source.Subscribe(firstObserver);

                _otherSubscription         = Params._other.Subscribe(otherObserver);
                otherObserver.Subscription = _otherSubscription;

                return(new[] { firstSubscription, _otherSubscription });
            }
Ejemplo n.º 2
0
            protected override IEnumerable <ISubscription> OnSubscribe()
            {
                _firstSubscription = new SingleAssignmentSubscription();
                var otherSubscription = new SingleAssignmentSubscription();

                var firstObserver = new FirstObserver(this, _firstSubscription);

                _otherObserver = new OtherObserver(this, firstObserver, otherSubscription);
                _firstSubscription.Subscription = Params._source.Subscribe(firstObserver);
                otherSubscription.Subscription  = Params._other.Take(1).Subscribe(_otherObserver);

                return(new[] { _firstSubscription, otherSubscription });
            }