/// <summary> /// Adds contents of all assemblies referenced by <paramref name="cu" />'s project. /// Also adds contents of <paramref name="callingClass" />. /// </summary> public static void AddReferencedProjectsContents(List <ICompletionEntry> result, ICompilationUnit cu, IClass callingClass) { IProjectContent projectContent = cu.ProjectContent; projectContent.AddNamespaceContents(result, "", projectContent.Language, true); var allContents = projectContent.GetAllContents(); result.Capacity = result.Count + allContents.Count; foreach (var entry in allContents.Where(e => !(e is NamespaceEntry))) { result.Add(entry); } AddUsing(result, projectContent.DefaultImports, projectContent); AddContentsFromCallingClass(result, projectContent, callingClass); }