public FileScanerHostedService( ICFTReadAllProcess readAllProcess, IOptions <FileScanerOptions> options, IFileProviderFactory fileProviderFactory, ICFTMiddlewareBuilder cftMiddlewareBuilder) { if (fileProviderFactory == null) { throw new ArgumentNullException(nameof(fileProviderFactory)); } _readAllProcess = readAllProcess ?? throw new ArgumentNullException(nameof(readAllProcess)); _options = options?.Value ?? throw new ArgumentNullException(nameof(options)); _cftMiddlewareBuilder = cftMiddlewareBuilder ?? throw new ArgumentNullException(nameof(cftMiddlewareBuilder)); _fileProvider = fileProviderFactory.GetFileProvider(options.Value.FileProviderType, options.Value.FileProviderSettings); try { options.Value.ValidateOptions(); } catch (Exception e) { throw new CFTConfigurationException("Ошибка конфигурации службы.", e); } }
public CFTReadAllProcessLodDecorator(ICFTReadAllProcess component, ILogger <ICFTReadAllProcess> logger) { _component = component ?? throw new ArgumentNullException(nameof(component)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }