Udostępnij za pośrednictwem


FixAllProvider Class

Definition

Implement this abstract type to provide fix all/multiple occurrences code fixes for source code problems. Alternatively, you can use any of the well known fix all providers from WellKnownFixAllProviders.

public ref class FixAllProvider abstract
public abstract class FixAllProvider
type FixAllProvider = class
Public MustInherit Class FixAllProvider
Inheritance
FixAllProvider
Derived

Constructors

FixAllProvider()

Methods

Create(Func<FixAllContext,Document,ImmutableArray<Diagnostic>,Task<Document>>, ImmutableArray<FixAllScope>)

Create a FixAllProvider that fixes documents independently for the given supportedFixAllScopes. This should be used instead of BatchFixer in the case where fixes for a Diagnostic only affect the Document the diagnostic was produced in.

Create(Func<FixAllContext,Document,ImmutableArray<Diagnostic>,Task<Document>>)

Create a FixAllProvider that fixes documents independently. This should be used instead of BatchFixer in the case where fixes for a Diagnostic only affect the Document the diagnostic was produced in.

GetFixAsync(FixAllContext)

Gets fix all occurrences fix for the given fixAllContext.

GetSupportedFixAllDiagnosticIds(CodeFixProvider)

Gets the diagnostic IDs for which fix all occurrences is supported. By default, it returns FixableDiagnosticIds for the given originalCodeFixProvider.

GetSupportedFixAllScopes()

Gets the supported scopes for fixing all occurrences of a diagnostic. By default, it returns the following scopes: (a) Document (b) Project and (c) Solution

Applies to