Example #1
0
        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);
            }
        }
Example #2
0
 public NotSender(IOptions <NSyncConfiguration> nSyncConfiguration)
 {
     _nSyncConfiguration = nSyncConfiguration.Value;
 }