CompilationUnitManager.TryRemoveSourceFileAsync(Uri, Boolean) Method

Definition

Removes the file identified by uri from the list of source files for this compilation unit, publishes empty Diagnostics for that file unless publishEmptyDiagnostics is set to false, and adapts all remaining diagnostics as needed.

public System.Threading.Tasks.Task TryRemoveSourceFileAsync (Uri uri, bool publishEmptyDiagnostics = true);
member this.TryRemoveSourceFileAsync : Uri * bool -> System.Threading.Tasks.Task
Public Function TryRemoveSourceFileAsync (uri As Uri, Optional publishEmptyDiagnostics As Boolean = true) As Task

Parameters

uri
Uri
publishEmptyDiagnostics
Boolean

Returns

Task

Exceptions

uri is null or not an absolute file URI.

Remarks

Does nothing if uri does not identify a source file of this compilation unit.

Applies to