FixAllContext Constructors

Definition

Overloads

FixAllContext(Document, CodeFixProvider, FixAllScope, String, IEnumerable<String>, FixAllContext+DiagnosticProvider, CancellationToken)

Creates a new FixAllContext. Use this overload when applying fix all to a diagnostic with a source location.

This overload cannot be used with ContainingMember or ContainingType value for the scope. For those fix all scopes, use the FixAllContext constructor that takes a 'diagnosticSpan' parameter to identify the containing member or type based on this span.

FixAllContext(Project, CodeFixProvider, FixAllScope, String, IEnumerable<String>, FixAllContext+DiagnosticProvider, CancellationToken)

Creates a new FixAllContext. Use this overload when applying fix all to a diagnostic with no source location, i.e. None.

FixAllContext(Document, Nullable<TextSpan>, CodeFixProvider, FixAllScope, String, IEnumerable<String>, FixAllContext+DiagnosticProvider, CancellationToken)

Creates a new FixAllContext with an associated diagnosticSpan. Use this overload when applying fix all to a diagnostic with a source location and using ContainingMember or ContainingType for the scope. When using other fix all scopes, diagnosticSpan is not required and other constructor which does not take a diagnostic span can be used instead.

FixAllContext(Document, CodeFixProvider, FixAllScope, String, IEnumerable<String>, FixAllContext+DiagnosticProvider, CancellationToken)

Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs

Creates a new FixAllContext. Use this overload when applying fix all to a diagnostic with a source location.

This overload cannot be used with ContainingMember or ContainingType value for the scope. For those fix all scopes, use the FixAllContext constructor that takes a 'diagnosticSpan' parameter to identify the containing member or type based on this span.

public:
 FixAllContext(Microsoft::CodeAnalysis::Document ^ document, Microsoft::CodeAnalysis::CodeFixes::CodeFixProvider ^ codeFixProvider, Microsoft::CodeAnalysis::CodeFixes::FixAllScope scope, System::String ^ codeActionEquivalenceKey, System::Collections::Generic::IEnumerable<System::String ^> ^ diagnosticIds, Microsoft::CodeAnalysis::CodeFixes::FixAllContext::DiagnosticProvider ^ fixAllDiagnosticProvider, System::Threading::CancellationToken cancellationToken);
public FixAllContext (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider codeFixProvider, Microsoft.CodeAnalysis.CodeFixes.FixAllScope scope, string codeActionEquivalenceKey, System.Collections.Generic.IEnumerable<string> diagnosticIds, Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider fixAllDiagnosticProvider, System.Threading.CancellationToken cancellationToken);
public FixAllContext (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider codeFixProvider, Microsoft.CodeAnalysis.CodeFixes.FixAllScope scope, string? codeActionEquivalenceKey, System.Collections.Generic.IEnumerable<string> diagnosticIds, Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider fixAllDiagnosticProvider, System.Threading.CancellationToken cancellationToken);
new Microsoft.CodeAnalysis.CodeFixes.FixAllContext : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider * Microsoft.CodeAnalysis.CodeFixes.FixAllScope * string * seq<string> * Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.FixAllContext
Public Sub New (document As Document, codeFixProvider As CodeFixProvider, scope As FixAllScope, codeActionEquivalenceKey As String, diagnosticIds As IEnumerable(Of String), fixAllDiagnosticProvider As FixAllContext.DiagnosticProvider, cancellationToken As CancellationToken)

Parameters

document
Document

Document within which fix all occurrences was triggered.

codeFixProvider
CodeFixProvider

Underlying CodeFixProvider which triggered this fix all.

scope
FixAllScope

FixAllScope to fix all occurrences.

codeActionEquivalenceKey
String

The EquivalenceKey value expected of a CodeAction participating in this fix all.

diagnosticIds
IEnumerable<String>

Diagnostic Ids to fix.

fixAllDiagnosticProvider
FixAllContext.DiagnosticProvider

FixAllContext.DiagnosticProvider to fetch document/project diagnostics to fix in a FixAllContext.

cancellationToken
CancellationToken

Cancellation token for fix all computation.

Applies to

FixAllContext(Project, CodeFixProvider, FixAllScope, String, IEnumerable<String>, FixAllContext+DiagnosticProvider, CancellationToken)

Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs

Creates a new FixAllContext. Use this overload when applying fix all to a diagnostic with no source location, i.e. None.

public:
 FixAllContext(Microsoft::CodeAnalysis::Project ^ project, Microsoft::CodeAnalysis::CodeFixes::CodeFixProvider ^ codeFixProvider, Microsoft::CodeAnalysis::CodeFixes::FixAllScope scope, System::String ^ codeActionEquivalenceKey, System::Collections::Generic::IEnumerable<System::String ^> ^ diagnosticIds, Microsoft::CodeAnalysis::CodeFixes::FixAllContext::DiagnosticProvider ^ fixAllDiagnosticProvider, System::Threading::CancellationToken cancellationToken);
public FixAllContext (Microsoft.CodeAnalysis.Project project, Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider codeFixProvider, Microsoft.CodeAnalysis.CodeFixes.FixAllScope scope, string codeActionEquivalenceKey, System.Collections.Generic.IEnumerable<string> diagnosticIds, Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider fixAllDiagnosticProvider, System.Threading.CancellationToken cancellationToken);
public FixAllContext (Microsoft.CodeAnalysis.Project project, Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider codeFixProvider, Microsoft.CodeAnalysis.CodeFixes.FixAllScope scope, string? codeActionEquivalenceKey, System.Collections.Generic.IEnumerable<string> diagnosticIds, Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider fixAllDiagnosticProvider, System.Threading.CancellationToken cancellationToken);
new Microsoft.CodeAnalysis.CodeFixes.FixAllContext : Microsoft.CodeAnalysis.Project * Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider * Microsoft.CodeAnalysis.CodeFixes.FixAllScope * string * seq<string> * Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.FixAllContext
Public Sub New (project As Project, codeFixProvider As CodeFixProvider, scope As FixAllScope, codeActionEquivalenceKey As String, diagnosticIds As IEnumerable(Of String), fixAllDiagnosticProvider As FixAllContext.DiagnosticProvider, cancellationToken As CancellationToken)

Parameters

project
Project

Project within which fix all occurrences was triggered.

codeFixProvider
CodeFixProvider

Underlying CodeFixProvider which triggered this fix all.

scope
FixAllScope

FixAllScope to fix all occurrences.

codeActionEquivalenceKey
String

The EquivalenceKey value expected of a CodeAction participating in this fix all.

diagnosticIds
IEnumerable<String>

Diagnostic Ids to fix.

fixAllDiagnosticProvider
FixAllContext.DiagnosticProvider

FixAllContext.DiagnosticProvider to fetch document/project diagnostics to fix in a FixAllContext.

cancellationToken
CancellationToken

Cancellation token for fix all computation.

Applies to

FixAllContext(Document, Nullable<TextSpan>, CodeFixProvider, FixAllScope, String, IEnumerable<String>, FixAllContext+DiagnosticProvider, CancellationToken)

Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs
Source:
FixAllContext.cs

Creates a new FixAllContext with an associated diagnosticSpan. Use this overload when applying fix all to a diagnostic with a source location and using ContainingMember or ContainingType for the scope. When using other fix all scopes, diagnosticSpan is not required and other constructor which does not take a diagnostic span can be used instead.

public FixAllContext (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Text.TextSpan? diagnosticSpan, Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider codeFixProvider, Microsoft.CodeAnalysis.CodeFixes.FixAllScope scope, string? codeActionEquivalenceKey, System.Collections.Generic.IEnumerable<string> diagnosticIds, Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider fixAllDiagnosticProvider, System.Threading.CancellationToken cancellationToken);
new Microsoft.CodeAnalysis.CodeFixes.FixAllContext : Microsoft.CodeAnalysis.Document * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider * Microsoft.CodeAnalysis.CodeFixes.FixAllScope * string * seq<string> * Microsoft.CodeAnalysis.CodeFixes.FixAllContext.DiagnosticProvider * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.FixAllContext
Public Sub New (document As Document, diagnosticSpan As Nullable(Of TextSpan), codeFixProvider As CodeFixProvider, scope As FixAllScope, codeActionEquivalenceKey As String, diagnosticIds As IEnumerable(Of String), fixAllDiagnosticProvider As FixAllContext.DiagnosticProvider, cancellationToken As CancellationToken)

Parameters

document
Document

Document within which fix all occurrences was triggered.

diagnosticSpan
Nullable<TextSpan>

Span for the diagnostic for which fix all occurrences was triggered.

codeFixProvider
CodeFixProvider

Underlying CodeFixProvider which triggered this fix all.

scope
FixAllScope

FixAllScope to fix all occurrences.

codeActionEquivalenceKey
String

The EquivalenceKey value expected of a CodeAction participating in this fix all.

diagnosticIds
IEnumerable<String>

Diagnostic Ids to fix.

fixAllDiagnosticProvider
FixAllContext.DiagnosticProvider

FixAllContext.DiagnosticProvider to fetch document/project diagnostics to fix in a FixAllContext.

cancellationToken
CancellationToken

Cancellation token for fix all computation.

Applies to