MetalamaAPI documentationAdvanced APIMetalama.​Framework.​Engine.​Aspect­WeaversAspect­Weaver­ContextRewrite­Aspect­Targets­Async
Open sandboxFocus

AspectWeaverContext.RewriteAspectTargetsAsync Method

RewriteAspectTargetsAsync(CSharpSyntaxRewriter, CancellationToken)

Rewrites the syntax nodes targeted by aspects using a thread-safe Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.

Declaration
public Task RewriteAspectTargetsAsync(CSharpSyntaxRewriter rewriter, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter rewriter

A Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter whose Visit method is invoked for all declarations that are the target of aspects handled by the current IAspectWeaver (see AspectInstances). In case of partial classes or methods, the Visit method is invoked for each partial declaration.

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
Task