Class ProjectFileWriter
Writes a workspace's .rdproj ProjectFile to disk — the write counterpart of
IProjectFileLoader. Used to scaffold a new workspace and (eventually) to persist
edits a client makes to the project structure.
public sealed class ProjectFileWriter : IProjectFileWriter
- Inheritance
-
ProjectFileWriter
- Implements
- Inherited Members
Constructors
ProjectFileWriter(IFileSystem)
Writes a workspace's .rdproj ProjectFile to disk — the write counterpart of
IProjectFileLoader. Used to scaffold a new workspace and (eventually) to persist
edits a client makes to the project structure.
public ProjectFileWriter(IFileSystem fileSystem)
Parameters
fileSystemIFileSystem
Methods
SaveAsync(ProjectFile, CancellationToken)
Serializes project to <project.Uri>/.rdproj, overwriting any
existing file. The parent directory must exist. IsDirty is not
consulted — the caller decides whether a write is warranted.
public Task SaveAsync(ProjectFile project, CancellationToken token = default)
Parameters
projectProjectFileThe project to write; its Uri is the workspace root.
tokenCancellationTokenA token that cancels the write.
Returns
Exceptions
- IOException
The file could not be written.