private IEnumerable <IAnalysisItemView> CalculateChildren() { if (_module == null) { _module = _interpreter.ImportModule(Name); } if (File.Exists(_idbPath)) { yield return(RawView.FromFile(_idbPath)); } var cpm = _module as Interpreter.LegacyDB.CPythonModule; if (cpm != null) { cpm.EnsureLoaded(); } if (cpm != null && cpm._hiddenMembers != null) { foreach (var keyValue in cpm._hiddenMembers) { yield return(MemberView.Make(_context, keyValue.Key, keyValue.Value)); } } foreach (var memberName in _module.GetMemberNames(_context)) { yield return(MemberView.Make(_context, _module, memberName)); } }
private IEnumerable <IAnalysisItemView> CalculateReturnTypes() { if (_overload.ReturnType != null) { return(_overload.ReturnType.Select(t => MemberView.Make(_context, t.Name, t))); } else { return(Enumerable.Empty <IAnalysisItemView>()); } }
private IEnumerable <IAnalysisItemView> CalculateTypes() { if (_parameter.ParameterTypes == null || _parameter.ParameterTypes.Count == 0) { return(Enumerable.Empty <IAnalysisItemView>()); } return(_parameter.ParameterTypes .Select(t => MemberView.Make(_context, t.Name, t)) .ToArray()); }
private IEnumerable <IAnalysisItemView> CalculateReturnTypes() { var seen = new HashSet <IAnalysisItemView>(); foreach (var overload in _function.Overloads) { if (overload.ReturnType != null) { foreach (var type in overload.ReturnType.Select(t => MemberView.Make(_context, t.Name, t))) { if (seen.Add(type)) { yield return(type); } } } } }