MetalamaAPI documentationAdvanced APIMetalama.​Framework.​Engine.​Aspect­WeaversAspect­Weaver­Context
Open sandboxFocus

AspectWeaverContext Class

Context for the IAspectWeaver.

Inheritance
System.Object
AspectWeaverContext
Namespace: Metalama.Framework.Engine.AspectWeavers
Assembly: Metalama.Framework.Sdk.dll
Syntax
[CompileTime]
public sealed class AspectWeaverContext : Object

Properties

Name Description
AspectClass

Gets the type of aspects that must be handled.

AspectInstances

Gets the set of aspect instances that must be weaved.

CancellationToken
Compilation

Gets or sets the compilation.

CompilationServices
GeneratedCodeAnnotation

Gets the annotation with which code generated by the aspect must be annotated. To mark a node, the WithGeneratedCodeAnnotation(SyntaxToken, SyntaxAnnotation) method must be called.

Project

Gets the current project.

ServiceProvider

Methods

Name Description
GetOptions<T>(ISymbol)
ReportDiagnostic(Diagnostic)
RewriteAspectTargetsAsync(CSharpSyntaxRewriter, CancellationToken)
RewriteSyntaxTreesAsync(CSharpSyntaxRewriter, CancellationToken)
RewriteSyntaxTreesAsync(Func<SyntaxNode, CSharpSyntaxRewriter>, CancellationToken)