CompilationUnitManager Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compilation unit manager.
public class CompilationUnitManager : IDisposable
type CompilationUnitManager = class
interface IDisposable
Public Class CompilationUnitManager
Implements IDisposable
- Inheritance
-
CompilationUnitManager
- Implements
Remarks
This class intentionally does not give access to any FileContentManager that it manages, since it is responsible for coordinating access to (any routine of) the FileContentManager.
Constructors
| CompilationUnitManager(ProjectProperties, Action<Exception>, Action<String,MessageType>, Action<PublishDiagnosticParams>, Boolean) |
Initializes a CompilationUnitManager instance for a project with the given properties. |
Properties
| Log |
General purpose logging routine. |
| LogException |
Used to log exceptions raised during processing. |
| Processing |
Used to synchronously execute all write access. |
| PublishDiagnostics |
Called whenever diagnostics within a file have changed and are ready for publishing. |
Methods
| AddOrUpdateSourceFileAsync(FileContentManager, String) |
Adds |
| AddOrUpdateSourceFilesAsync(ImmutableHashSet<FileContentManager>, Boolean) |
Adds |
| Build() |
Returns a CompilationUnitManager.Compilation containing all information about the current state of the compilation. |
| Dispose() |
Cancels any ongoing type checking, waits for all queued tasks to finish, and then disposes disposable content initialized within this CompilationUnitManager (in particular disposes the CompilationUnitManager.Compilation). |
| FileContentInMemory(TextDocumentIdentifier) |
Gets the current file content (text representation) in memory. |
| FlushAndExecute<T>(Func<T>) |
Cancels any asynchronously running ongoing global type checking. After all currently queued tasks
have finished, locks all processing, flushes the unprocessed changes in each source file,
synchronously runs a global type checking (unless verifications are disabled), and then executes
|
| Formatting(TextDocumentIdentifier, Boolean, Boolean, Int32) |
Returns the edits to format the file according to the specified settings. |
| GetDiagnostics(TextDocumentIdentifier) |
Get all current diagnostics. |
| GetFileId(Uri) |
Converts a URI into the file ID used during compilation if the URI is an absolute file URI. |
| GetSourceFiles() |
Returns a sequence of all source files that are currently contained in this compilation unit. |
| GetSyntaxTree() |
Returns the syntax tree for the current state of the compilation. |
| GetTokenization(TextDocumentIdentifier) |
Gets the current tokenization of the file content in memory. Each returned array item contains the array of tokens on the line with the corresponding index. |
| InitializeFileManager(Uri, String, Action<PublishDiagnosticParams>, Action<Exception>) |
Initializes a FileContentManager for document |
| InitializeFileManagers(IDictionary<Uri,String>, Action<PublishDiagnosticParams>, Action<Exception>) |
Initializes a FileContentManager for each entry in |
| Rename(RenameParams) |
Returns the workspace edit that describes the changes to be done if the symbol at the given position - if any - is renamed to the given name. |
| SourceFileDidChangeAsync(DidChangeTextDocumentParams) |
Modifies the compilation and all diagnostics to reflect the given change. |
| TryGetFileId(Uri, String) |
Obsolete.
Converts a URI into the file ID used during compilation if the URI is an absolute file URI. |
| TryGetUri(String, Uri) |
Returns the URI based on which |
| TryRemoveSourceFileAsync(Uri, Boolean) |
Removes the file identified by |
| TryRemoveSourceFilesAsync(IEnumerable<Uri>, Boolean, Boolean) |
Removes |
| UpdateReferencesAsync(References) |
Replaces the content from all referenced assemblies with |