public SubscriptionCollection(IMessageBus messageBus) { _messageBus = messageBus; _subscriptions = new DisposableCollection(); WorkerPool = new DisposableWorkerPool(messageBus.WorkerPool, _subscriptions); _router = new DisposableTopicRouter(messageBus.PublishRouter, messageBus.RequestRouter, messageBus.ScatterRouter, _subscriptions); Modules = new ReadOnlyModules(messageBus); }
public EventSourceContext(IPubSubBus messageBus) { Assert.ArgumentNotNull(messageBus, nameof(messageBus)); _messageBus = messageBus; IterationDelayMs = -1; Modules = new ReadOnlyModules(messageBus); WorkerPool = new ReadOnlyWorkerPool(messageBus.WorkerPool); }