Пример #1
0
        /// <summary>
        /// Gets the list of modules known by the current analysis.
        /// </summary>
        /// <param name="topLevelOnly">Only return top-level modules.</param>
        public MemberResult[] GetModules(bool topLevelOnly = false)
        {
            List <MemberResult> res = new List <MemberResult>(ProjectState.GetModules(topLevelOnly));

            var children = GlobalScope.GetChildrenPackages(InterpreterContext);

            foreach (var child in children)
            {
                res.Add(new MemberResult(child.Key, PythonMemberType.Module));
            }

            return(res.ToArray());
        }