public FileWatcher(IOptions <M2MConfiguration> config, IFileReadyChecker fileReadyChecker, ILogger <FileWatcher> logger, IRequestInfoGenerator requestInfoGenerator) { _fileReadyChecker = fileReadyChecker; _logger = logger; _requestInfoGenerator = requestInfoGenerator; _config = config.Value; // Listen to files being added to the selected directory. _fileSystemWatcher = new FileSystemWatcher(_config.ReadDirectory) { IncludeSubdirectories = true, NotifyFilter = NotifyFilters.FileName, EnableRaisingEvents = true }; _fileSystemWatcher.Created += OnFileCreated; logger.LogInformation($"Listening to file changes under: {_config.ReadDirectory}"); }
public RestSharpFileUploader(IOptions <M2MConfiguration> config, ICertificateStore certificateStore, ILogger <RestSharpFileUploader> logger) { _certificateStore = certificateStore; _config = config.Value; _logger = logger; }
public CertificateStore(IOptions <M2MConfiguration> config, ILogger <CertificateStore> logger) { _config = config.Value; _logger = logger; }
public RequestInfoGenerator(IFileInfoFactory infoFactory, IOptions <M2MConfiguration> requestConfiguration) { _infoFactory = infoFactory; _config = requestConfiguration.Value; }
public NetHttpClient(IOptions <M2MConfiguration> config, IHttpClientFactory clientFactory, ILogger <NetHttpClient> logger) { _clientFactory = clientFactory; _logger = logger; _config = config.Value; }