Пример #1
0
 public void add(Function func)
 {
     if (m_globalFunctions.ContainsKey(func.Name))
     {
         for(int i =0;i<func.Param.Count;i++){
             if(m_globalFunctions[func.Name].Param.Contains(func.Param[i])) {
                 continue;
             }
             m_globalFunctions[func.Name].Param.Add(func.Param[i]);
             m_globalFunctions[func.Name].Desc.Add(func.Desc[i]);
         }
     }
     else
     {
         m_globalFunctions[func.Name] = func;
     }
 }
Пример #2
0
        public void addMethod(Function method)
        {
            if (!m_methods.ContainsKey(method.Name))
            {
                method.Class = this;
                m_methods[method.Name] = method;
            }
            else
            {
                /*m_methods[method.Name].Param.Add(method.Param[0]);
                m_methods[method.Name].Desc.Add(method.Desc[0]);*/

                for (int i = 0; i < method.Param.Count; i++)
                {
                    if (m_methods[method.Name].Param.Contains(method.Param[i]))
                    {
                        continue;
                    }
                    m_methods[method.Name].Param.Add(method.Param[i]);
                    m_methods[method.Name].Desc.Add(method.Desc[i]);
                }
            }
        }