Пример #1
0
 /// <summary>
 /// Close the handler functions.
 /// </summary>
 /// <param name="handler">The directory.</param>
 /// <param name="result">The result status. </param>
 /// <returns></returns>
 public string CloseHandler(IDirectoryHandler handler, out bool result)
 {
     try
     {
         handler.Watcher.EnableRaisingEvents = false;
         handler.Watcher.Created            -= new FileSystemEventHandler(handler.Create);
         handler.InvokeCloseEvent();
         result = true;
     } catch (Exception e) { result = false; }
     return("success");
 }