Beispiel #1
0
 public SenderWorker(IServiceScopeFactory serviceScopeFactory)
 {
     using (var scope = serviceScopeFactory.CreateScope())
     {
         _messageStorege    = scope.ServiceProvider.GetRequiredService <IMessageStoregeService>();
         _connectionStorage = scope.ServiceProvider.GetRequiredService <IConnectionStorageService>();
     }
 }
Beispiel #2
0
 public PublisherService(IMessageStoregeService messageStoregeService)
 {
     _messageStorage = messageStoregeService;
 }