Share via


CodeFixContext.RegisterCodeFix Method

Definition

Overloads

RegisterCodeFix(CodeAction, Diagnostic)

Add supplied action to the list of fixes that will be offered to the user.

RegisterCodeFix(CodeAction, IEnumerable<Diagnostic>)

Add supplied action to the list of fixes that will be offered to the user.

RegisterCodeFix(CodeAction, ImmutableArray<Diagnostic>)

Add supplied action to the list of fixes that will be offered to the user.

RegisterCodeFix(CodeAction, Diagnostic)

Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs

Add supplied action to the list of fixes that will be offered to the user.

public:
 void RegisterCodeFix(Microsoft::CodeAnalysis::CodeActions::CodeAction ^ action, Microsoft::CodeAnalysis::Diagnostic ^ diagnostic);
public void RegisterCodeFix (Microsoft.CodeAnalysis.CodeActions.CodeAction action, Microsoft.CodeAnalysis.Diagnostic diagnostic);
member this.RegisterCodeFix : Microsoft.CodeAnalysis.CodeActions.CodeAction * Microsoft.CodeAnalysis.Diagnostic -> unit
Public Sub RegisterCodeFix (action As CodeAction, diagnostic As Diagnostic)

Parameters

action
CodeAction

The CodeAction that will be invoked to apply the fix.

diagnostic
Diagnostic

The subset of Diagnostics being addressed / fixed by the action.

Applies to

RegisterCodeFix(CodeAction, IEnumerable<Diagnostic>)

Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs

Add supplied action to the list of fixes that will be offered to the user.

public:
 void RegisterCodeFix(Microsoft::CodeAnalysis::CodeActions::CodeAction ^ action, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::Diagnostic ^> ^ diagnostics);
public void RegisterCodeFix (Microsoft.CodeAnalysis.CodeActions.CodeAction action, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostic> diagnostics);
member this.RegisterCodeFix : Microsoft.CodeAnalysis.CodeActions.CodeAction * seq<Microsoft.CodeAnalysis.Diagnostic> -> unit
Public Sub RegisterCodeFix (action As CodeAction, diagnostics As IEnumerable(Of Diagnostic))

Parameters

action
CodeAction

The CodeAction that will be invoked to apply the fix.

diagnostics
IEnumerable<Diagnostic>

The subset of Diagnostics being addressed / fixed by the action.

Applies to

RegisterCodeFix(CodeAction, ImmutableArray<Diagnostic>)

Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs
Source:
CodeFixContext.cs

Add supplied action to the list of fixes that will be offered to the user.

public:
 void RegisterCodeFix(Microsoft::CodeAnalysis::CodeActions::CodeAction ^ action, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^> diagnostics);
public void RegisterCodeFix (Microsoft.CodeAnalysis.CodeActions.CodeAction action, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> diagnostics);
member this.RegisterCodeFix : Microsoft.CodeAnalysis.CodeActions.CodeAction * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> -> unit
Public Sub RegisterCodeFix (action As CodeAction, diagnostics As ImmutableArray(Of Diagnostic))

Parameters

action
CodeAction

The CodeAction that will be invoked to apply the fix.

diagnostics
ImmutableArray<Diagnostic>

The subset of Diagnostics being addressed / fixed by the action.

Applies to