Ejemplo n.º 1
0
        public void Load(string type_dump_file)
        {
            CSharpType_t mem = null;

            string[] ll = File.ReadAllLines(type_dump_file);
            for (int i = 0; i < ll.Length && i < TestClassCount; ++i)
            {
                if (i % 200 == 0)
                {
                    EditorUtility.DisplayProgressBar(type_dump_file, ll[i], (float)i / ll.Length);
                }

                if (ll[i].StartsWith("\t"))
                {
                    string newLine = ll[i].TrimStart(trimChars);
                    //过滤掉
                    if (newLine == "Field;System.Int32 value__")
                    {
                        fielterLine++;
                    }
                    else
                    {
                        mem.Add(newLine);
                    }
                }
                else
                {
                    mem = new CSharpType_t(ll[i]);
                    if (dic.ContainsKey(mem.TypeName))
                    {
                        dic.Add(mem.TypeName + "_1", mem);
                    }
                    else
                    {
                        dic.Add(mem.TypeName, mem);
                    }
                }
            }
            UnityEngine.Debug.LogError("Load: " + type_dump_file + ";ll = " + ll.Length + ";dic = " + dic.Count + ";fielterLine=" + fielterLine);
        }
Ejemplo n.º 2
0
 public int Compare(object x, object y)
 {
     return(CSharpType_t.NSResultCompare((CSharpType_t)x, (CSharpType_t)y));
 }