Class LibrarySymbolProvider
The symbols of the libraries a project references: the ones that are not the standard library, which is the platform's own (StdLibSymbolProvider).
public sealed class LibrarySymbolProvider : ISymbolProvider
- Inheritance
-
LibrarySymbolProvider
- Implements
- Inherited Members
Remarks
The language server and the environment host each build their symbols from the same libraries, with this, so that a name the language server bound binds to the same symbol in the host - which is why the symbols are addressed under the workspace and nothing else decides their address.
Constructors
LibrarySymbolProvider(Uri, ReferencedLibraries, bool)
Creates the provider for libraries that are loaded.
public LibrarySymbolProvider(Uri workspaceRoot, ReferencedLibraries libraries, bool is64Bit = true)
Parameters
workspaceRootUriThe workspace the symbols are addressed under.
librariesReferencedLibrariesThe libraries (Load(ILibrarySource, IEnumerable<RDCoreReference>)).
is64BitboolThe pointer width of the environment.
Properties
Libraries
The libraries, and the ones that could not be loaded.
public ReferencedLibraries Libraries { get; }
Property Value
Methods
Load(ILibrarySource, IEnumerable<RDCoreReference>)
Loads the libraries a project references.
public static ReferencedLibraries Load(ILibrarySource source, IEnumerable<RDCoreReference> references)
Parameters
sourceILibrarySourceWhere the descriptions are.
referencesIEnumerable<RDCoreReference>The references of the project.
Returns
ProvideSymbols()
Yields the symbols this provider's source defines. May be lazy.
public IEnumerable<Symbol> ProvideSymbols()
Returns
ReadDescribed(ILibrarySource, Uri, string, bool)
Reads the symbols of a library whether or not the project references it, and of the libraries it depends on: what tooling knows of the class of an object created by name (ObjectCreationFact).
public static ImmutableArray<Symbol> ReadDescribed(ILibrarySource source, Uri workspaceRoot, string library, bool is64Bit = true)
Parameters
sourceILibrarySourceWhere the descriptions are.
workspaceRootUriThe workspace the symbols are addressed under.
librarystringThe name of the library.
is64BitboolThe pointer width of the environment.
Returns
- ImmutableArray<Symbol>
The symbols; none when the source has no library of the name, or it cannot be loaded.
Remarks
The symbols are never names of the project: the workspace is not composed with them, and no code can use them. They are addressed as the symbols of a referenced library are, so that the class they describe is the same one when the project does reference it.