Пример #1
0
 public void WireUpSubscriber(ISubscriptionResolver subscriptionResolver, object subscriber)
 {
     foreach (var disposable in SubscriptionsFor(subscriber))
     {
         subscriptionResolver.Add(disposable);
     }
 }
Пример #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;
        }
Пример #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);
        }
Пример #4
0
 public void Add(ISubscriptionResolver resolver)
 {
     resolvers.Add(resolver);
 }
Пример #5
0
 void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver)
 {
     ((IConfigurableSubscriber)_subscriber).AddResolver(resolver);
 }
Пример #6
0
 public void Add(ISubscriptionResolver resolver)
 {
     _resolvers.Add(resolver);
 }
Пример #7
0
 void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver)
 {
     CheckDisposed();
     resolver.TryInvoke(r => r.Services = _services);
     _resolvers.Add(resolver);
 }
Пример #8
0
 void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver)
 {
     CheckDisposed();
     resolver.Being <IRequireServices>(_ => _.AddServices(_services));
     _resolvers.Add(resolver);
 }
Пример #9
0
 private void AddResolver(ISubscriptionResolver resolver)
 {
     _subscriber.AddResolver(resolver);
 }