Example #1
0
            public void Run(IObservable <TFirst> first, IObservable <TSecond> second)
            {
                var fstO = new FirstObserver(this);
                var sndO = new SecondObserver(this);

                Disposable.SetSingle(ref _secondDisposable, second.SubscribeSafe(sndO));
                SetUpstream(first.SubscribeSafe(fstO));
            }
Example #2
0
            public void Run(IObservable <TFirst> first, IObservable <TSecond> second)
            {
                var fstO = new FirstObserver(this);
                var sndO = new SecondObserver(this);

                fstO.SetOther(sndO);
                sndO.SetOther(fstO);

                _firstDisposable.Disposable  = first.SubscribeSafe(fstO);
                _secondDisposable.Disposable = second.SubscribeSafe(sndO);
            }
Example #3
0
                public _(Func <TFirst, TSecond, TResult> resultSelector, IObserver <TResult> observer)
                    : base(observer)
                {
                    _gate = new object();

                    _firstObserver  = new FirstObserver(this);
                    _secondObserver = new SecondObserver(this);

                    _firstObserver.SetOther(_secondObserver);
                    _secondObserver.SetOther(_firstObserver);

                    _resultSelector = resultSelector;
                }
Example #4
0
            public void Run(IObservable <TFirst> first, IObservable <TSecond> second)
            {
                _gate = new object();

                var fstO = new FirstObserver(this);
                var sndO = new SecondObserver(this);

                fstO.Other = sndO;
                sndO.Other = fstO;

                Disposable.SetSingle(ref _firstDisposable, first.SubscribeSafe(fstO));
                Disposable.SetSingle(ref _secondDisposable, second.SubscribeSafe(sndO));
            }
Example #5
0
            public IDisposable Run(IObservable <TFirst> first, IObservable <TSecond> second)
            {
                _gate       = new object();
                _latestGate = new object();

                var sndSubscription = new SingleAssignmentDisposable();

                var fstO = new FirstObserver(this);
                var sndO = new SecondObserver(this, sndSubscription);

                sndSubscription.Disposable = second.SubscribeSafe(sndO);
                var fstSubscription = first.SubscribeSafe(fstO);

                return(StableCompositeDisposable.Create(fstSubscription, sndSubscription));
            }
Example #6
0
 public void SetOther(SecondObserver other)
 {
     _other = other;
 }
Example #7
0
 public FirstObserver(_ parent)
 {
     _parent = parent;
     _queue  = new Queue <TFirst>();
     _other  = default !; // NB: Will be set by SetOther.
Example #8
0
 public FirstObserver(_ parent)
 {
     _parent = parent;
     _other  = default !; // NB: Will be set by SetOther.