MetalamaAPI documentationAspect APIMetalama.​Framework.​Code­FixesCode­Fix­FactoryApply­Aspect
Open sandboxFocus

CodeFixFactory.ApplyAspect Method

ApplyAspect<T>(T, IAspect<T>, String)

Creates a CodeFix that applies a given aspect to a given declaration, so that the source code itself is modified by the aspect.

public static CodeFix ApplyAspect<T>(T targetDeclaration, IAspect<T> aspect, string title = null)
where T : class, IDeclaration
Type Name Description
T targetDeclaration

The declaration to which the aspect must be applied.

IAspect<T> aspect

The aspect that must be applied to the declaration.

System.String title

An optional title of the CodeFix, displayed to the user in the light bulb or refactoring menu. When not specified, the title is generated from the other parameters.

Type Description
Type Parameters
Name Description