Open sandboxFocus

Constructor CodeFix

CodeFix(string, Func<ICodeActionBuilder, Task>)

Initializes a new instance of the CodeFix class. This constructor must only be used to create multi-transformations code fixes. For single-step code fixes, use CodeFixFactory.

Declaration
public CodeFix(string title, Func<ICodeActionBuilder, Task> codeAction)
Parameters
Type Name Description
string title

Title of the code fix, shown to the user (must be unique).

Func<ICodeActionBuilder, Task> codeAction

Delegate executed when the code fix is chosen by the user.