/// <summary> /// Retrieves list of packages declared in the file via 'library' statements /// </summary> /// <param name="context"></param> /// <returns></returns> private Task <IEnumerable <IPackageInfo> > GetAllFilePackagesAsync(IRIntellisenseContext context) { var loadedPackages = _session?.LoadedPackageNames ?? Enumerable.Empty <string>(); var filePackageNames = context.AstRoot.GetFilePackageNames(); var allPackageNames = PackageIndex.PreloadedPackages.Union(filePackageNames).Union(loadedPackages); return(_packageIndex.GetPackagesInfoAsync(allPackageNames)); }
/// <summary> /// Retrieves list of packages declared in the file via 'library' statements /// </summary> /// <param name="context"></param> /// <returns></returns> private Task <IEnumerable <IPackageInfo> > GetAllFilePackagesAsync(RCompletionContext context) { IEnumerable <string> loadedPackages = _session?.LoadedPackageNames ?? Enumerable.Empty <string>(); IEnumerable <string> filePackageNames = context.AstRoot.GetFilePackageNames(); IEnumerable <string> allPackageNames = PackageIndex.PreloadedPackages.Union(filePackageNames).Union(loadedPackages); return(_packageIndex.GetPackagesInfoAsync(allPackageNames)); }