Skip to main content

WorkspaceExtensions.RemovePreprocessorDirectivesAsync Method

Containing Type: WorkspaceExtensions

Assembly: Roslynator.CSharp.Workspaces.dll

Overloads​

MethodSummary
RemovePreprocessorDirectivesAsync(Document, PreprocessorDirectiveFilter, CancellationToken)Creates a new document with preprocessor directives of the specified kind removed.
RemovePreprocessorDirectivesAsync(Document, TextSpan, PreprocessorDirectiveFilter, CancellationToken)Creates a new document with preprocessor directives of the specified kind removed.

RemovePreprocessorDirectivesAsync(Document, PreprocessorDirectiveFilter, CancellationToken)​

Creates a new document with preprocessor directives of the specified kind removed.

public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> RemovePreprocessorDirectivesAsync(this Microsoft.CodeAnalysis.Document document, Roslynator.CSharp.PreprocessorDirectiveFilter directiveFilter, System.Threading.CancellationToken cancellationToken = default)

Parameters​

document   Document

directiveFilter   PreprocessorDirectiveFilter

cancellationToken   CancellationToken

Returns​

Task<Document>

RemovePreprocessorDirectivesAsync(Document, TextSpan, PreprocessorDirectiveFilter, CancellationToken)​

Creates a new document with preprocessor directives of the specified kind removed.

public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> RemovePreprocessorDirectivesAsync(this Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Text.TextSpan span, Roslynator.CSharp.PreprocessorDirectiveFilter directiveFilter, System.Threading.CancellationToken cancellationToken = default)

Parameters​

document   Document

span   TextSpan

directiveFilter   PreprocessorDirectiveFilter

cancellationToken   CancellationToken

Returns​

Task<Document>