Пример #1
0
        internal static bool IsRetryableIOException(IOException exception)
        {
            bool result         = false;
            int  win32Code      = 0;
            int  hrforException = Marshal.GetHRForException(exception);

            if (FileOperations.IsVolumeLockedHResult(hrforException))
            {
                return(true);
            }
            if (FileOperations.ConvertHResultToWin32(hrforException, out win32Code))
            {
                result = FileOperations.IsRetryableIOErrorCode(win32Code);
            }
            return(result);
        }
Пример #2
0
        internal static bool IsVolumeLockedException(IOException exception)
        {
            int hrforException = Marshal.GetHRForException(exception);

            return(FileOperations.IsVolumeLockedHResult(hrforException));
        }