Beispiel #1
0
 public override ISubscriber <int?> CreateSubscriber(WhiteboxSubscriberProbe <int?> probe)
 {
     return(new LamdaSubscriber <int?>(
                onSubscribe: subscription => probe.RegisterOnSubscribe(new SubscriberPuppet(subscription)),
                onNext: probe.RegisterOnNext,
                onError: probe.RegisterOnError,
                onComplete: probe.RegisterOnComplete));
 }
Beispiel #2
0
 public SimpleSubscriberWithProbe(WhiteboxSubscriberProbe <int?> probe, Action <int?> onNext = null,
                                  Action <ISubscription> onSubscribe = null, Action <Exception> onError = null, Action onComplete = null)
 {
     _probe       = probe;
     _onNext      = onNext ?? (element => _probe.RegisterOnNext(element));
     _onSubscribe = onSubscribe ??
                    (subscription => _probe.RegisterOnSubscribe(NewSimpleSubscriberPuppet(subscription)));
     _onError    = onError ?? (cause => _probe.RegisterOnError(cause));
     _onComplete = onComplete ?? (() => _probe.RegisterOnComplete());
 }
Beispiel #3
0
            public override void OnSubscribe(ISubscription subscription)
            {
                base.OnSubscribe(subscription);

                _probe.RegisterOnSubscribe(new SubscriberPuppet(subscription));
            }
 public void OnSubscribe(ISubscription subscription)
 {
     _probe.RegisterOnSubscribe(new Puppet(subscription));
     _hole.OnSubscribe(subscription);
 }