CompilationUnitManager.TryRemoveSourceFilesAsync 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 files from the list of source files for this compilation unit,
publishes empty Diagnostics for the removed files unless publishEmptyDiagnostics is set to false,
and adapts all remaining diagnostics as needed.
public System.Threading.Tasks.Task TryRemoveSourceFilesAsync (System.Collections.Generic.IEnumerable<Uri> files, bool suppressVerification = false, bool publishEmptyDiagnostics = true);
member this.TryRemoveSourceFilesAsync : seq<Uri> * bool * bool -> System.Threading.Tasks.Task
Public Function TryRemoveSourceFilesAsync (files As IEnumerable(Of Uri), Optional suppressVerification As Boolean = false, Optional publishEmptyDiagnostics As Boolean = true) As Task
Parameters
- files
- IEnumerable<Uri>
- suppressVerification
- Boolean
- publishEmptyDiagnostics
- Boolean
Returns
Exceptions
A URI in files is not an absolute file URI.
Remarks
Does nothing if a file with the given Uri is not listed as source file.
Spawns a compilation unit wide type checking unless suppressVerification is set to true, even if no files have been removed.