Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code­Fixes / ICode­Action­Builder / Apply­Aspect­Async

Method ApplyAspectAsync

ApplyAspectAsync<TTarget>(TTarget, IAspect<TTarget>)

Applies an aspect to a given declaration (so that the source code of the given declaration is modified by the affect).

Declaration
Task ApplyAspectAsync<TTarget>(TTarget targetDeclaration, IAspect<TTarget> aspect)
where TTarget : class, IDeclaration
Parameters
Type Name Description
TTarget targetDeclaration
IAspect<TTarget> aspect
Returns
Type Description
Task
Type Parameters
Name Description
TTarget