CompilationUnitManager.TryRemoveSourceFileAsync(Uri, Boolean) Method
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.
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
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.