Share via


FixAllProvider.Create Method

Definition

Overloads

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.

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>>)

Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs

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.

public static Microsoft.CodeAnalysis.CodeFixes.FixAllProvider Create (Func<Microsoft.CodeAnalysis.CodeFixes.FixAllContext,Microsoft.CodeAnalysis.Document,System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document?>> fixAllAsync);
static member Create : Func<Microsoft.CodeAnalysis.CodeFixes.FixAllContext, Microsoft.CodeAnalysis.Document, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> -> Microsoft.CodeAnalysis.CodeFixes.FixAllProvider
Public Shared Function Create (fixAllAsync As Func(Of FixAllContext, Document, ImmutableArray(Of Diagnostic), Task(Of Document))) As FixAllProvider

Parameters

fixAllAsync
Func<FixAllContext,Document,ImmutableArray<Diagnostic>,Task<Document>>

Callback that will the fix diagnostics present in the provided document. The document returned will only be examined for its content (e.g. it's SyntaxTree or SourceText. No other aspects of it (like attributes), or changes to the Project or Solution it points at will be considered.

Returns

Applies to

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

Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs
Source:
FixAllProvider.cs

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.

public static Microsoft.CodeAnalysis.CodeFixes.FixAllProvider Create (Func<Microsoft.CodeAnalysis.CodeFixes.FixAllContext,Microsoft.CodeAnalysis.Document,System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document?>> fixAllAsync, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeFixes.FixAllScope> supportedFixAllScopes);
static member Create : Func<Microsoft.CodeAnalysis.CodeFixes.FixAllContext, Microsoft.CodeAnalysis.Document, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeFixes.FixAllScope> -> Microsoft.CodeAnalysis.CodeFixes.FixAllProvider
Public Shared Function Create (fixAllAsync As Func(Of FixAllContext, Document, ImmutableArray(Of Diagnostic), Task(Of Document)), supportedFixAllScopes As ImmutableArray(Of FixAllScope)) As FixAllProvider

Parameters

fixAllAsync
Func<FixAllContext,Document,ImmutableArray<Diagnostic>,Task<Document>>

Callback that will the fix diagnostics present in the provided document. The document returned will only be examined for its content (e.g. it's SyntaxTree or SourceText. No other aspects of it (like attributes), or changes to the Project or Solution it points at will be considered.

supportedFixAllScopes
ImmutableArray<FixAllScope>

Supported FixAllScopes for the fix all provider. Note that Custom is not supported by the DocumentBasedFixAllProvider and should not be part of the supported scopes.

Returns

Applies to