public void WireUpSubscriber(ISubscriptionResolver subscriptionResolver, object subscriber) { foreach (var disposable in SubscriptionsFor(subscriber)) { subscriptionResolver.Add(disposable); } }
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; }
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); }
public void Add(ISubscriptionResolver resolver) { resolvers.Add(resolver); }
void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver) { ((IConfigurableSubscriber)_subscriber).AddResolver(resolver); }
public void Add(ISubscriptionResolver resolver) { _resolvers.Add(resolver); }
void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver) { CheckDisposed(); resolver.TryInvoke(r => r.Services = _services); _resolvers.Add(resolver); }
void IConfigurableSubscriber.AddResolver(ISubscriptionResolver resolver) { CheckDisposed(); resolver.Being <IRequireServices>(_ => _.AddServices(_services)); _resolvers.Add(resolver); }
private void AddResolver(ISubscriptionResolver resolver) { _subscriber.AddResolver(resolver); }