예제 #1
0
        public static bool ParseForStruct(Type type, string str, ref string strT, DictionaryView <string, Property> props)
        {
            int num = 0;

            for (int i = 0; i < str.get_Length(); i++)
            {
                char c = str.get_Chars(i);
                if (c == ';' || c == '{' || c == '}')
                {
                    int j = num;
                    while (j <= i)
                    {
                        strT += str.get_Chars(j++);
                    }
                    num = i + 1;
                }
                else if (c == ' ')
                {
                    string text = string.Empty;
                    int    num2 = num;
                    while (str.get_Chars(num2) != '=')
                    {
                        text += str.get_Chars(num2++);
                    }
                    num2++;
                    string text2 = string.Empty;
                    while (str.get_Chars(num2) != ' ')
                    {
                        text2 += str.get_Chars(num2++);
                    }
                    bool bStatic = false;
                    if (text2 == "static")
                    {
                        num2++;
                        while (str.get_Chars(num2) != ' ')
                        {
                            text2 += str.get_Chars(num2++);
                        }
                        bStatic = true;
                    }
                    string text3 = string.Empty;
                    i++;
                    while (str.get_Chars(i) != ';')
                    {
                        text3 += str.get_Chars(i++);
                    }
                    props.set_Item(text, Property.Create(text2, text3, null, bStatic, false));
                    num = i + 1;
                }
            }
            return(true);
        }