Interface IProjectFileLoader
Loads a workspace's .rdproj ProjectFile from disk, read-only. Every platform
component that needs the project structure — the language server's workspace services and the
environment host's session composition — resolves the project through this service so there is a
single deserialization path.
public interface IProjectFileLoader
Methods
LoadAsync(string, CancellationToken)
Loads and deserializes the .rdproj under workspaceRoot, stamping its
Uri with the workspace root everything else is relative to.
Task<ProjectFile> LoadAsync(string workspaceRoot, CancellationToken token = default)
Parameters
workspaceRootstringThe absolute path of the workspace root directory.
tokenCancellationTokenA token that cancels the read.
Returns
Exceptions
- FileNotFoundException
No
.rdprojexists under the workspace root.- InvalidOperationException
The
.rdprojcould not be deserialized.
TryLocate(string, out string)
Resolves the path a .rdproj would occupy under workspaceRoot and
reports whether a file exists there.
bool TryLocate(string workspaceRoot, out string projectFilePath)
Parameters
workspaceRootstringThe absolute path of the workspace root directory.
projectFilePathstringThe resolved
.rdprojpath, whether or not it exists.
Returns
- bool
trueif a file exists atprojectFilePath.