Class ReferencedLibraries
The libraries a project references, loaded: those that were asked for and those they depend on, and the ones that could not be.
public sealed class ReferencedLibraries
- Inheritance
-
ReferencedLibraries
- Inherited Members
Remarks
A library is loaded as a whole or not at all. One that cannot be found or read is a problem, and so is every library that depends on it: what a library declares is typed with what it depends on, and a description whose types name nothing is not one a project can be checked against.
Libraries that depend on one another are rejected, not resolved: each of the libraries on the cycle is a problem, with the cycle in it. There is no order to load them in, and the platform does not make one up. (The types a single library declares may name one another freely; that is not a reference between libraries.)
Properties
Libraries
The libraries that were loaded, each after the libraries it depends on.
public ImmutableArray<LibraryDescription> Libraries { get; }
Property Value
None
No libraries, and no problems.
public static ReferencedLibraries None { get; }
Property Value
Priorities
The precedence of each library that was loaded, by its name: of two libraries that declare a name, the one with the higher number is the one the name means (LibraryPriority).
public ImmutableDictionary<string, int> Priorities { get; }
Property Value
Remarks
A library the project references comes after the ones it references before, as the references of a project are in the order of their precedence (RD-VBAL §2.3.1.2); a library that is loaded only because another depends on it comes before all of them, in the order it was loaded. The standard library, which the platform provides and which is lowest of all, has none.
Problems
The libraries that could not be loaded.
public ImmutableArray<LibraryProblem> Problems { get; }
Property Value
Methods
Load(ILibrarySource, IEnumerable<string>, IReadOnlyCollection<string>)
Loads the libraries a project references.
public static ReferencedLibraries Load(ILibrarySource source, IEnumerable<string> references, IReadOnlyCollection<string> provided)
Parameters
sourceILibrarySourceWhere the descriptions are.
referencesIEnumerable<string>The names the project references, in the order of its references. The standard library (
VBA) is the platform's own, and is not asked of the source.providedIReadOnlyCollection<string>The names of the libraries the platform provides itself.