예제 #1
0
        public void ParseContentAndHyperlink(sbyte[] srcContent, int srcContentLength, ref string content, ref string hyperlink)
        {
            int num  = -1;
            int num2 = -1;

            for (int i = 0; i < srcContentLength; i++)
            {
                if (srcContent[i].Equals(91))
                {
                    num = i;
                }
                else if (srcContent[i].Equals(93))
                {
                    num2 = i;
                }
            }
            if (0 < num && num < num2)
            {
                sbyte[] array = new sbyte[num];
                for (int j = 0; j < array.Length; j++)
                {
                    array[j] = srcContent[j];
                }
                content = Utility.UTF8Convert(array, array.Length);
                sbyte[] array2 = new sbyte[num2 - num + 1 - 2];
                for (int k = 0; k < array2.Length; k++)
                {
                    array2[k] = srcContent[num + 1 + k];
                }
                hyperlink = Utility.UTF8Convert(array2, array2.Length);
            }
            if (!CHyperLink.IsStandCommond(hyperlink))
            {
                content   = Utility.UTF8Convert(srcContent, srcContentLength);
                hyperlink = null;
            }
        }
예제 #2
0
파일: CMail.cs 프로젝트: isoundy000/wzry-1
        public void ParseContentAndHyperlink(sbyte[] srcContent, int srcContentLength, ref string content, ref string hyperlink)
        {
            int num  = -1;
            int num2 = -1;

            for (int i = 0; i < srcContentLength; i++)
            {
                if (srcContent[i].Equals((sbyte)0x5b))
                {
                    num = i;
                }
                else if (srcContent[i].Equals((sbyte)0x5d))
                {
                    num2 = i;
                }
            }
            if ((0 < num) && (num < num2))
            {
                sbyte[] p = new sbyte[num];
                for (int j = 0; j < p.Length; j++)
                {
                    p[j] = srcContent[j];
                }
                content = Utility.UTF8Convert(p, p.Length);
                sbyte[] numArray2 = new sbyte[((num2 - num) + 1) - 2];
                for (int k = 0; k < numArray2.Length; k++)
                {
                    numArray2[k] = srcContent[(num + 1) + k];
                }
                hyperlink = Utility.UTF8Convert(numArray2, numArray2.Length);
            }
            if (!CHyperLink.IsStandCommond(hyperlink))
            {
                content   = Utility.UTF8Convert(srcContent, srcContentLength);
                hyperlink = null;
            }
        }