예제 #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;
     }
 }
예제 #2
0
 public void AddWatcher(string folderPath)
 {
     try
     {
         var watcherObject = new WatcherObject(folderPath);
         watcherObject.Change += OnChanged;
         watcherObject.Rename += OnRenamed;
         _watchers.Add(watcherObject);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #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));
     }
 }