示例#1
0
        /// <summary>
        /// Cleans up the temp files used by the Validator.
        /// </summary>
        /// <returns>True if all files were deleted, false otherwise.</returns>
        public bool DeleteTempFiles()
        {
            if (null == this.tempFiles)
            {
                return(true); // no work to do
            }
            else
            {
                bool deleted = Common.DeleteTempFiles(this.tempFiles.BasePath, this);

                if (deleted)
                {
                    this.tempFiles = null; // temp files have been deleted, no need to remember this now
                }

                return(deleted);
            }
        }
示例#2
0
        /// <summary>
        /// Cleans up the temp files used by the Binder.
        /// </summary>
        /// <returns>True if all files were deleted, false otherwise.</returns>
        public virtual bool DeleteTempFiles()
        {
            if (null == this.tempFiles)
            {
                return(true); // no work to do
            }
            else
            {
                bool deleted = Common.DeleteTempFiles(this.TempFilesLocation, this.core);

                if (deleted)
                {
                    ((IDisposable)this.tempFiles).Dispose();
                    this.tempFiles = null; // temp files have been deleted, no need to remember this now
                }

                return(deleted);
            }
        }
示例#3
0
        /// <summary>
        /// Cleans up the temp files used by the Inscriber.
        /// </summary>
        /// <returns>True if all files were deleted, false otherwise.</returns>
        public bool DeleteTempFiles()
        {
#if REDO_IN_NETCORE
            if (null == this.tempFiles)
            {
                return(true); // no work to do
            }
            else
            {
                bool deleted = Common.DeleteTempFiles(this.TempFilesLocation, this);

                if (deleted)
                {
                    ((IDisposable)this.tempFiles).Dispose();
                    this.tempFiles = null; // temp files have been deleted, no need to remember this now
                }

                return(deleted);
            }
#endif
            return(true);
        }
示例#4
0
 /// <summary>
 /// Delete a directory with retries and best-effort cleanup.
 /// </summary>
 /// <param name="path">The directory to delete.</param>
 /// <param name="messageHandler">The message handler.</param>
 /// <returns>True if all files were deleted, false otherwise.</returns>
 public static bool DeleteDirectory(string path, IMessageHandler messageHandler)
 {
     return(Common.DeleteTempFiles(path, messageHandler));
 }
示例#5
0
        /// <summary>
        /// Cleans up the temp files used by the Binder.
        /// </summary>
        /// <returns>True if all files were deleted, false otherwise.</returns>
        private bool DeleteTempFiles()
        {
            bool deleted = Common.DeleteTempFiles(this.TempFilesLocation, this.core);

            return(deleted);
        }