CodeFixProvider Class

Definition

Implement this type to provide fixes for source code problems. Remember to use ExportCodeFixProviderAttribute so the host environment can offer your fixes in a UI.

public ref class CodeFixProvider abstract
public abstract class CodeFixProvider
type CodeFixProvider = class
Public MustInherit Class CodeFixProvider
Inheritance
CodeFixProvider

Constructors

CodeFixProvider()

Properties

FixableDiagnosticIds

A list of diagnostic IDs that this provider can provide fixes for.

Methods

GetFixAllProvider()

Gets an optional FixAllProvider that can fix all/multiple occurrences of diagnostics fixed by this code fix provider. Return null if the provider doesn't support fix all/multiple occurrences. Otherwise, you can return any of the well known fix all providers from WellKnownFixAllProviders or implement your own fix all provider.

RegisterCodeFixesAsync(CodeFixContext)

Computes one or more fixes for the specified CodeFixContext.

Applies to