示例#1
0
        private RArray MethodList(bool inherited_too, InsMethods ins)
        {
            ArrayList ary = new ArrayList();

            lock (this)
            {
                for (RMetaObject klass = this; klass != null; klass = klass.super)
                {
                    foreach (DictionaryEntry entry in klass.m_tbl)
                    {
                        ////string s = ins.Inspect(ruby, (uint)entry.Key, (RNode)entry.Value);
                        RCMethod m = (RCMethod)entry.Value;
                        string   s = m.Name;
                        if (s != null && ary.Contains(s) == false)
                        {
                            ary.Add(s);
                        }
                    }
                    if (inherited_too == false)
                    {
                        break;
                    }
                }
            }
            return(new RArray(ruby, ary));
        }
示例#2
0
文件: Class.cs 项目: emtees/old-code
 private RArray MethodList(bool inherited_too, InsMethods ins)
 {
     ArrayList ary = new ArrayList();
     lock (this)
     {
         for (RMetaObject klass = this; klass != null; klass = klass.super)
         {
             foreach (DictionaryEntry entry in klass.m_tbl)
             {
                 ////string s = ins.Inspect(ruby, (uint)entry.Key, (RNode)entry.Value);
                 RCMethod m = (RCMethod)entry.Value;
                 string s = m.Name;
                 if (s != null && ary.Contains(s) == false)
                 {
                     ary.Add(s);
                 }
             }
             if (inherited_too == false) break;
         }
     }
     return new RArray(ruby, ary);
 }