internal static bool IsFatalIOException(IOException exception, out int hresult)
        {
            bool result    = false;
            int  win32Code = 0;

            hresult = Marshal.GetHRForException(exception);
            if (FileOperations.ConvertHResultToWin32(hresult, out win32Code))
            {
                result = FileOperations.IsFatalIOErrorCode(win32Code);
            }
            return(result);
        }
        internal static bool Win32ErrorCodeToIOFailureTag(int win32code, FailureTag defaultFailureTag, out FailureTag failureTag)
        {
            failureTag = FailureTag.NoOp;
            if (win32code <= 80)
            {
                switch (win32code)
                {
                case 0:
                case 2:
                    break;

                case 1:
                case 4:
                    goto IL_77;

                case 3:
                case 5:
                    failureTag = FailureTag.Configuration;
                    return(true);

                default:
                    switch (win32code)
                    {
                    case 38:
                        break;

                    case 39:
                        goto IL_72;

                    default:
                        if (win32code != 80)
                        {
                            goto IL_77;
                        }
                        break;
                    }
                    break;
                }
            }
            else if (win32code <= 112)
            {
                if (win32code != 87)
                {
                    if (win32code != 112)
                    {
                        goto IL_77;
                    }
                    goto IL_72;
                }
            }
            else if (win32code != 183)
            {
                if (win32code != 206)
                {
                    goto IL_77;
                }
                failureTag = FailureTag.Unrecoverable;
                return(true);
            }
            failureTag = FailureTag.NoOp;
            return(true);

IL_72:
            failureTag = FailureTag.Space;
            return(true);

IL_77:
            if (FileOperations.IsRetryableIOErrorCode(win32code))
            {
                failureTag = FailureTag.NoOp;
                return(true);
            }
            if (FileOperations.IsFatalIOErrorCode(win32code))
            {
                failureTag = FailureTag.IoHard;
                return(true);
            }
            failureTag = defaultFailureTag;
            return(false);
        }