Example #1
0
        public override void Handle()
        {
            for (int i = 0; i < subs.Count; ++i)
            {
                CodeClass_t cc = subs[i] as CodeClass_t;
                if (cc != null)
                {
                    cc.Handle();
                    continue;
                }

                if (subs[i].isIEnumerator())
                {
                    //找到
                    string func = _FetchIEnumeratorFuncName(subs[i]._title);
                    if (func != null)
                    {
                        CodeIteratorClass_t iter = _FindIteratorClass(func);
                        if (iter != null)
                        {
                            iter.ReplaceTo(subs[i]);
                        }
                        else
                        {
                            LogError("没有找到对应的CodeIteratorClass_t: " + func);
                        }
                    }
                    else
                    {
                        LogError("没有找到 _FetchIEnumeratorFuncName: " + subs[i]._title);
                    }
                }
            }
        }