Click or drag to resize

CodeFixProvider Class



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.
Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysis.CodeFixesCodeFixProvider

Namespace:  Microsoft.CodeAnalysis.CodeFixes
Assembly:  Microsoft.CodeAnalysis.Workspaces (in Microsoft.CodeAnalysis.Workspaces.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract class CodeFixProvider

The CodeFixProvider type exposes the following members.

Constructors
  NameDescription
Protected methodCodeFixProvider
Initializes a new instance of the CodeFixProvider class
Top
Properties
  NameDescription
Public propertyFixableDiagnosticIds
A list of diagnostic IDs that this provider can provider fixes for.
Top
Methods
  NameDescription
Public methodGetFixAllProvider
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.
Public methodRegisterCodeFixesAsync
Computes one or more fixes for the specified CodeFixContext.
Top
See Also