public void Load(IServiceCollection services) { EnsureArg.IsNotNull(services, nameof(services)); DicomCastWorkerConfiguration dicomCastWorkerConfiguration = services.Configure <DicomCastWorkerConfiguration>( _configuration, DicomCastWorkerConfigurationSectionName); DicomCastConfiguration dicomValidationConfiguration = services.Configure <DicomCastConfiguration>( _configuration, DicomValidationConfigurationSectionName); RetryConfiguration retryConfiguration = services.Configure <RetryConfiguration>( _configuration, RetryConfigurationSectionName); services.Add <DicomCastWorker>() .Singleton() .AsSelf() .AsImplementedInterfaces(); RegisterPipeline(services); services.Add <ChangeFeedProcessor>() .Singleton() .AsSelf() .AsImplementedInterfaces(); services.Decorate <IChangeFeedProcessor, LoggingChangeFeedProcessor>(); services.Add <SyncStateService>() .Singleton() .AsSelf() .AsImplementedInterfaces(); }
public DicomCastWorker( IOptions <DicomCastWorkerConfiguration> dicomCastWorkerConfiguration, IChangeFeedProcessor changeFeedProcessor, ILogger <DicomCastWorker> logger) { EnsureArg.IsNotNull(dicomCastWorkerConfiguration?.Value, nameof(dicomCastWorkerConfiguration)); EnsureArg.IsNotNull(changeFeedProcessor, nameof(changeFeedProcessor)); EnsureArg.IsNotNull(logger, nameof(logger)); _dicomCastWorkerConfiguration = dicomCastWorkerConfiguration.Value; _changeFeedProcessor = changeFeedProcessor; _logger = logger; }
public DicomCastWorker( IOptions <DicomCastWorkerConfiguration> dicomCastWorkerConfiguration, IChangeFeedProcessor changeFeedProcessor, ILogger <DicomCastWorker> logger, IHostApplicationLifetime hostApplicationLifetime, IFhirService fhirService) { EnsureArg.IsNotNull(dicomCastWorkerConfiguration?.Value, nameof(dicomCastWorkerConfiguration)); EnsureArg.IsNotNull(changeFeedProcessor, nameof(changeFeedProcessor)); EnsureArg.IsNotNull(logger, nameof(logger)); EnsureArg.IsNotNull(hostApplicationLifetime, nameof(hostApplicationLifetime)); EnsureArg.IsNotNull(fhirService, nameof(fhirService)); _dicomCastWorkerConfiguration = dicomCastWorkerConfiguration.Value; _changeFeedProcessor = changeFeedProcessor; _logger = logger; _hostApplicationLifetime = hostApplicationLifetime; _fhirService = fhirService; }