CompilationUnitManager.AddOrUpdateSourceFileAsync Method

Definition

Adds file to this compilation unit, adapting the diagnostics for all remaining files as needed.

public System.Threading.Tasks.Task AddOrUpdateSourceFileAsync (Microsoft.Quantum.QsCompiler.CompilationBuilder.FileContentManager file, string? updatedContent = default);
member this.AddOrUpdateSourceFileAsync : Microsoft.Quantum.QsCompiler.CompilationBuilder.FileContentManager * string -> System.Threading.Tasks.Task
Public Function AddOrUpdateSourceFileAsync (file As FileContentManager, Optional updatedContent As String = Nothing) As Task

Parameters

updatedContent
String

If provided, replaces the tracked content in the file manager.

Returns

Task

Remarks

If a file with the same URI is already listed as a source file, replaces the current FileContentManager for that file with file.

Applies to