Open sandboxFocus

Method RewriteSyntaxTreesAsync

RewriteSyntaxTreesAsync(CSharpSyntaxRewriter, CancellationToken)

Rewrites all syntax trees in the compilation using a shared and thread-safe CSharpSyntaxRewriter.

Declaration
public Task RewriteSyntaxTreesAsync(CSharpSyntaxRewriter rewriter, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CSharpSyntaxRewriter rewriter

A shared and thread-safe CSharpSyntaxRewriter.

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
Task

RewriteSyntaxTreesAsync(Func<SyntaxNode, CSharpSyntaxRewriter>, CancellationToken)

Rewrites all syntax trees in the compilation.

Declaration
public Task RewriteSyntaxTreesAsync(Func<SyntaxNode, CSharpSyntaxRewriter> rewriterFactory, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Func<SyntaxNode, CSharpSyntaxRewriter> rewriterFactory
CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
Task