private static string UrlDecodeInternal(byte[] bytes, int offset, int count, Encoding encoding)
        {
            if (!XmlaHttpUtility.ValidateUrlEncodingParameters(bytes, offset, count))
            {
                return(null);
            }
            XmlaHttpUtility.UrlDecoder urlDecoder = new XmlaHttpUtility.UrlDecoder(count, encoding);
            int i = 0;

            while (i < count)
            {
                int  num = offset + i;
                byte b   = bytes[num];
                if (b == 43)
                {
                    b = 32;
                    goto IL_E6;
                }
                if (b != 37 || i >= count - 2)
                {
                    goto IL_E6;
                }
                if (bytes[num + 1] == 117 && i < count - 5)
                {
                    int num2 = XmlaHttpUtility.HexToInt((char)bytes[num + 2]);
                    int num3 = XmlaHttpUtility.HexToInt((char)bytes[num + 3]);
                    int num4 = XmlaHttpUtility.HexToInt((char)bytes[num + 4]);
                    int num5 = XmlaHttpUtility.HexToInt((char)bytes[num + 5]);
                    if (num2 < 0 || num3 < 0 || num4 < 0 || num5 < 0)
                    {
                        goto IL_E6;
                    }
                    char ch = (char)(num2 << 12 | num3 << 8 | num4 << 4 | num5);
                    i += 5;
                    urlDecoder.AddChar(ch);
                }
                else
                {
                    int num6 = XmlaHttpUtility.HexToInt((char)bytes[num + 1]);
                    int num7 = XmlaHttpUtility.HexToInt((char)bytes[num + 2]);
                    if (num6 >= 0 && num7 >= 0)
                    {
                        b  = (byte)(num6 << 4 | num7);
                        i += 2;
                        goto IL_E6;
                    }
                    goto IL_E6;
                }
IL_ED:
                i++;
                continue;
IL_E6:
                urlDecoder.AddByte(b);
                goto IL_ED;
            }
            return(urlDecoder.GetString());
        }
        private static string UrlDecodeInternal(string value, Encoding encoding)
        {
            if (value == null)
            {
                return(null);
            }
            int length = value.Length;

            XmlaHttpUtility.UrlDecoder urlDecoder = new XmlaHttpUtility.UrlDecoder(length, encoding);
            int i = 0;

            while (i < length)
            {
                char c = value[i];
                if (c == '+')
                {
                    c = ' ';
                    goto IL_10B;
                }
                if (c != '%' || i >= length - 2)
                {
                    goto IL_10B;
                }
                if (value[i + 1] == 'u' && i < length - 5)
                {
                    int num  = XmlaHttpUtility.HexToInt(value[i + 2]);
                    int num2 = XmlaHttpUtility.HexToInt(value[i + 3]);
                    int num3 = XmlaHttpUtility.HexToInt(value[i + 4]);
                    int num4 = XmlaHttpUtility.HexToInt(value[i + 5]);
                    if (num < 0 || num2 < 0 || num3 < 0 || num4 < 0)
                    {
                        goto IL_10B;
                    }
                    c  = (char)(num << 12 | num2 << 8 | num3 << 4 | num4);
                    i += 5;
                    urlDecoder.AddChar(c);
                }
                else
                {
                    int num5 = XmlaHttpUtility.HexToInt(value[i + 1]);
                    int num6 = XmlaHttpUtility.HexToInt(value[i + 2]);
                    if (num5 < 0 || num6 < 0)
                    {
                        goto IL_10B;
                    }
                    byte b = (byte)(num5 << 4 | num6);
                    i += 2;
                    urlDecoder.AddByte(b);
                }
IL_125:
                i++;
                continue;
IL_10B:
                if ((c & 'タ') == '\0')
                {
                    urlDecoder.AddByte((byte)c);
                    goto IL_125;
                }
                urlDecoder.AddChar(c);
                goto IL_125;
            }
            return(urlDecoder.GetString());
        }