Пример #1
0
 protected EventSubscription(string topicName, IServiceScopeFactory serviceScopeFactory)
 {
     _topicName           = topicName;
     _serviceScopeFactory = serviceScopeFactory;
     _subscriptionFactory = new SubscriptionFactory();
     _log          = serviceScopeFactory.CreateScope().ServiceProvider.GetRequiredService <ILog>();
     _eventHandler = new EventHandler(serviceScopeFactory, _subscriptionFactory);
 }
Пример #2
0
 public EventHandler(IServiceScopeFactory serviceScopeFactory, SubscriptionFactory subscriptionFactory)
 {
     _serviceScopeFactory = serviceScopeFactory;
     _subscriptionFactory = subscriptionFactory;
 }