public ClientMessageSender(IIndexEvents indexEvents, IQueueEvents queueEvents, IHubContext <NotifcationHub, INotifcationHub> notificationHub, IUploadTracker uploadTracker) { indexEvents.IndexStarted = OnIndexStarted; indexEvents.IndexCompleted = OnIndexCompleted; indexEvents.IndexFailed = OnIndexFailed; queueEvents.ItemProcessed = OnItemProcessed; _notificationHub = notificationHub; _uploadTracker = uploadTracker; }
/// <summary> /// Initializes a new instance of the <see cref="TimedIndexHostedService"/> class. /// </summary> /// <param name="logger">The logger.</param> public TimedIndexHostedService(IServiceProvider services, ILogger <TimedIndexHostedService> logger, IConfigService configService, IAdminLogService dblogger, IIndexEvents indexEvents, IImageMetadataService metadataService) { Name = "Image Indexer"; _serviceProvider = services; _logger = logger; _configService = configService; _adminlogger = dblogger; _indexEvents = indexEvents; _metadataService = metadataService; configService.DynamicConfig.PropertyChanged += _config_PropertyChanged; }