Ejemplo n.º 1
0
 public void WireUpSubscriber(ISubscriptionResolver subscriptionResolver, object subscriber)
 {
     foreach (var disposable in SubscriptionsFor(subscriber))
     {
         subscriptionResolver.Add(disposable);
     }
 }
Ejemplo n.º 2
0
        private void SetupCompositeSubscription(TextWriter writer)
        {
            var subs = Enumerable.Repeat(1, NumberOfStartingSubscriptions).Select(_ => NextSubBuilderIndex).Select(i => _subBuilders[i]()).ToList();

            if (!_alreadyRun)
            {
                ListSubscriptions(writer, subs);
            }

            _cSub = new CompositeSubscription(subs);
            _cRes = _cSub;
        }
Ejemplo n.º 3
0
        IDisposable IAdapterServices.WireUpSubscriber(ISubscriptionResolver subscriptionResolver, object subscriber)
        {
            var disposeShape     = new ShapeToDispose();
            var disposeContainer = new DisposeContainer();

            foreach (var disposable in SubscriptionsFor(subscriber).Select(disposeShape.EnhanceSubscription))
            {
                subscriptionResolver.Add(disposable);
                disposeContainer.Add(((IDisposableSubscription)disposable).GetDisposer());
            }

            PushDisposerToSubscriberIfPossible(subscriber, disposeContainer);

            return(disposeContainer);
        }
Ejemplo n.º 4
0
 public void Add(ISubscriptionResolver resolver)
 {
     resolvers.Add(resolver);
 }
Ejemplo n.º 5
0
 void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver)
 {
     ((IConfigurableSubscriber)_subscriber).AddResolver(resolver);
 }
Ejemplo n.º 6
0
 public void Add(ISubscriptionResolver resolver)
 {
     _resolvers.Add(resolver);
 }
Ejemplo n.º 7
0
 void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver)
 {
     CheckDisposed();
     resolver.TryInvoke(r => r.Services = _services);
     _resolvers.Add(resolver);
 }
Ejemplo n.º 8
0
 void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver)
 {
     CheckDisposed();
     resolver.Being <IRequireServices>(_ => _.AddServices(_services));
     _resolvers.Add(resolver);
 }
Ejemplo n.º 9
0
 private void AddResolver(ISubscriptionResolver resolver)
 {
     _subscriber.AddResolver(resolver);
 }