/// <summary> /// Raise the FileFailure event. /// </summary> /// <param name="file">The file name.</param> /// <param name="e">The exception detected.</param> public void OnFileFailure(string file, Exception e) { if (FileFailure == null) { alive_ = false; } else { ScanFailureEventArgs args = new ScanFailureEventArgs(file, e); FileFailure(this, args); alive_ = args.ContinueRunning; } }
/// <summary> /// Raise the DirectoryFailure event. /// </summary> /// <param name="directory">The directory name.</param> /// <param name="e">The exception detected.</param> public void OnDirectoryFailure(string directory, Exception e) { if (DirectoryFailure == null) { alive_ = false; } else { ScanFailureEventArgs args = new ScanFailureEventArgs(directory, e); DirectoryFailure(this, args); alive_ = args.ContinueRunning; } }