Exemplo n.º 1
0
        protected override void OnStart(string[] args)
        {
            FileServiceFolder fileService = _container.GetInstance <FileServiceFolder>();
            IAction           action      = _container.GetInstance <IAction>();

            _log.Info("OnStart");

            foreach (var folder in _configFolders)
            {
                _log.Info($"time: {folder.Period}, tick: {folder.Period.TotalSeconds}");

                FolderHistory folderHistory = new FolderHistory(_log, action, fileService);
                folderHistory.InitTrace(folder.Path, folder.Period);

                _folderHistories.Add(folderHistory);
            }
        }
Exemplo n.º 2
0
 public FolderHistory(ILog log, IAction action, FileServiceFolder fileService)
 {
     _log         = log;
     _action      = action;
     _fileService = fileService;
 }