Exemple #1
0
 public void AddWatcher(string folderPath)
 {
     try
     {
         var watcherObject = new WatcherObject(folderPath);
         watcherObject.Change += OnChanged;
         watcherObject.Rename += OnRenamed;
         _watchers.Add(watcherObject);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public void AddWatcher(string folderPath)
 {
     try
     {
         var watcherObject = new WatcherObject(folderPath);
         watcherObject.Change += OnChanged;
         watcherObject.Rename += OnRenamed;
         _watchers.Add(watcherObject);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #3
0
 public void AddWatcher(string folderPath, int intervalTime)
 {
     try
     {
         WatcherObject watcherObject = new WatcherObject(folderPath, intervalTime);
         watcherObject.MyLog   = this.MyLog;
         watcherObject.Change += OnChanged;
         watcherObject.Rename += OnRenamed;
         _watchers.Add(watcherObject);
     }
     catch (Exception ex)
     {
         MyLog.Error(string.Format("AddWatcher.Exception-->{0}", ex.Message));
     }
 }