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

CodeFixFactory Class

Creates instances of the CodeFix class.

Inheritance
CodeFixFactory
Namespace: Metalama.Framework.CodeFixes
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class CodeFixFactory : Object

Methods

Name Description
AddAttribute(IDeclaration, INamedType, String)

Creates a CodeFix that adds a custom attribute to a declaration, without constructor or named arguments, by specifying the INamedType of the attribute.

AddAttribute(IDeclaration, Func<AttributeConstruction>, String)

Creates a CodeFix that adds a custom attribute to a declaration, with constructor or named arguments, by providing an AttributeConstruction.

AddAttribute(IDeclaration, Type, String)

Creates a CodeFix that adds a custom attribute to a declaration, without constructor or named arguments, by specifying the reflection System.Type of the attribute.

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.

ChangeAccessibility(IMemberOrNamedType, Accessibility, String)

Creates a CodeFix that changes the accessibility of a given type or member.

RemoveAttributes(IDeclaration, INamedType, String)

Creates a CodeFix that removes all custom attributes of a given type from a declaration and all container declarations, by specifying the INamedType of the attribute.

RemoveAttributes(IDeclaration, Type, String)

Creates a CodeFix that removes all custom attributes of a given type from a declaration and all container declarations, by specifying the reflection System.Type of the attribute.