Table of Contents

Class LibrarySymbolProvider

Namespace
RDCore.SDK.Runtime.Libraries
Assembly
RDCore.SDK.dll

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

workspaceRoot Uri

The workspace the symbols are addressed under.

libraries ReferencedLibraries

The libraries (Load(ILibrarySource, IEnumerable<RDCoreReference>)).

is64Bit bool

The pointer width of the environment.

Properties

Libraries

The libraries, and the ones that could not be loaded.

public ReferencedLibraries Libraries { get; }

Property Value

ReferencedLibraries

Methods

Load(ILibrarySource, IEnumerable<RDCoreReference>)

Loads the libraries a project references.

public static ReferencedLibraries Load(ILibrarySource source, IEnumerable<RDCoreReference> references)

Parameters

source ILibrarySource

Where the descriptions are.

references IEnumerable<RDCoreReference>

The references of the project.

Returns

ReferencedLibraries

ProvideSymbols()

Yields the symbols this provider's source defines. May be lazy.

public IEnumerable<Symbol> ProvideSymbols()

Returns

IEnumerable<Symbol>

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

source ILibrarySource

Where the descriptions are.

workspaceRoot Uri

The workspace the symbols are addressed under.

library string

The name of the library.

is64Bit bool

The 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.