public NotWatcherService( IOptions <NSyncConfiguration> options, INotProcessor notProcessor) { _notProcessor = notProcessor; var filePath = Process.GetCurrentProcess().MainModule?.FileName; _dateFile = (filePath == null ? null : Path.GetDirectoryName(filePath) + "\\") + AppConstants.SyncDateFile; _nSyncConfiguration = options.Value; if (File.Exists(_dateFile)) { DateTime.TryParse(File.ReadAllText(_dateFile), out _lastSyncDateTime); } }
public NotSender(IOptions <NSyncConfiguration> nSyncConfiguration) { _nSyncConfiguration = nSyncConfiguration.Value; }