public List <Method> AllMethods()
        {
            List <Method> list  = new List <Method>();
            List <string> names = new List <string>();

            if (Father != null)
            {
                list = Father.AllMethods();
            }

            foreach (var item in list)
            {
                names.Add(item.Name);
            }

            foreach (var item in Methods)
            {
                if (names.Contains(item.Name))
                {
                    int idx = names.IndexOf(item.Name);
                    list[idx] = item;
                }
                else
                {
                    names.Add(item.Name);
                    list.Add(item);
                }
            }

            return(list);
        }
Esempio n. 2
0
        public List <Method> AllMethods()
        {
            List <Method> list = new List <Method>();

            if (Father != null)
            {
                list = Father.AllMethods();
            }

            foreach (var item in Methods)
            {
                list.Add(item);
            }

            return(list);
        }