/// <summary>
        /// Raise the FileFailure event.
        /// </summary>
        /// <param name="file">The file name.</param>
        /// <param name="e">The exception detected.</param>
        private bool OnFileFailure(string file, Exception e)
        {
            var  handler = FileFailure;
            bool result  = (handler != null);

            if (result)
            {
                var args = new ScanFailureEventArgs(file, e);
                FileFailure(this, args);
                _alive = args.ContinueRunning;
            }
            return(result);
        }
        /// <summary>
        /// Raise the DirectoryFailure event.
        /// </summary>
        /// <param name="directory">The directory name.</param>
        /// <param name="e">The exception detected.</param>
        private bool OnDirectoryFailure(string directory, Exception e)
        {
            var  handler = DirectoryFailure;
            bool result  = (handler != null);

            if (result)
            {
                var args = new ScanFailureEventArgs(directory, e);
                handler(this, args);
                _alive = args.ContinueRunning;
            }

            return(result);
        }