ProjectManager Class

Definition

public class ProjectManager : IDisposable
type ProjectManager = class
    interface IDisposable
Public Class ProjectManager
Implements IDisposable
Inheritance
ProjectManager
Implements

Constructors

ProjectManager(Action<Exception>, Action<String,MessageType>, Action<PublishDiagnosticParams>, SendTelemetryHandler)

Methods

AssemblyChangedOnDiskAsync(Uri)

To be called whenever a dll that may be referenced by one of the tracked projects is added, removed or changed on disk in order to update all projects referencing it accordingly.

CodeActions(CodeActionParams)

Returns a look-up of workspace edits suggested by the compiler for the given location and context.

Completions(TextDocumentPositionParams)

Returns a list of suggested completion items for the given location.

DefinitionLocation(TextDocumentPositionParams)

Returns the source file and position where the item at the given position is declared at, if such a declaration exists, and returns null otherwise.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

DocumentHighlights(TextDocumentPositionParams)

Returns an array with all usages of the identifier at the given position (if any) as an array of DocumentHighlight.

DocumentSymbols(DocumentSymbolParams)

Returns the SymbolInformation for each namespace declaration, type declaration, and function or operation declaration within the specified file.

FileContentInMemory(TextDocumentIdentifier)

Returns the content (text representation) of textDocument, if it is listed as source of a project or in the default manager.

FilterFiles(IEnumerable<String>, WarningCode, Func<String,String,Diagnostic>, IEnumerable<Uri>, IEnumerable<Uri>, IEnumerable<ValueTuple<String,Exception>>, Action<Diagnostic>, Action<Exception>)

For all files, verifies that a file with the corresponding full path exists, and returns a sequence containing the absolute path for all files that do.

Formatting(DocumentFormattingParams)

Returns the edits to format the file according to the specified settings.

GetDiagnostics(Uri)

Gets the diagnostics for a single source file, all source files in a managed project, or all source files in the default manager, depending on the value of file.

GetProjectDiagnostics(Uri)

Returns a copy of the current diagnostics generated upon loading.

HoverInformation(TextDocumentPositionParams, MarkupKind)

Returns information about the item at the specified position as Hover information.

LoadProjectReferences(IEnumerable<String>, Func<Uri,Uri>, Action<Diagnostic>, Action<Exception>)

Load project references.

LoadProjectsAsync(IEnumerable<Uri>, ProjectInformation+Loader, Func<Uri,FileContentManager>, Boolean)

Used for initial project loading.

LoadReferencedAssemblies(IEnumerable<String>, Action<Diagnostic>, Action<Exception>, Boolean)

Load referenced assemblies, returning a dictionary that maps each existing dll to the Q# attributes it contains.

LoadReferencedAssembliesInParallel(IEnumerable<String>, Action<Diagnostic>, Action<Exception>, Boolean)

Returns a dictionary that maps each existing dll to the Q# attributes it contains which are loaded in parallel. Generates a suitable error message for each binary file that could not be loaded. Calls the given onDiagnostic action on all generated diagnostics.

LoadSourceFiles(IEnumerable<String>, Action<Diagnostic>, Action<Exception>)

For each valid source file, generates the corrsponding TextDocumentIdentifier and reads the file content from disk.

ManagerTaskAsync(Uri, Action<CompilationUnitManager,Boolean>)

If file can be uniquely associated with a compilation unit, executes executeTask on the CompilationUnitManager of that project (if one exists), passing true as second argument.

Executes executeTask on the Microsoft.Quantum.QsCompiler.CompilationBuilder.ProjectManager.defaultManager otherwise, passing false as second argument.
MessageSource(Uri)
ProjectChangedOnDiskAsync(Uri, ProjectInformation+Loader, Func<Uri,FileContentManager>)

To be used whenever a project file is added, removed or updated.

Rename(RenameParams, Boolean)

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.

ResolveCompletion(CompletionItem, CompletionItemData, MarkupKind)

Resolves additional information for item.

SignatureHelp(TextDocumentPositionParams, MarkupKind)

Returns the signature help information for a call expression if there is such an expression at the specified position.

SourceFileChangedOnDiskAsync(Uri, Func<Uri,FileContentManager>)

To be called whenever a source file that may belong to one of the tracked projects has changed on disk.

SymbolReferences(ReferenceParams)

Returns an array with all locations where the symbol at the given position - if any - is referenced.

Applies to