다음을 통해 공유


CodeFixContext 생성자

정의

오버로드

CodeFixContext(Document, Diagnostic, Action<CodeAction,ImmutableArray<Diagnostic>>, CancellationToken)

메서드에 전달할 코드 수정 컨텍스트를 RegisterCodeFixesAsync(CodeFixContext) 만듭니다.

CodeFixContext(TextDocument, Diagnostic, Action<CodeAction,ImmutableArray<Diagnostic>>, CancellationToken)

메서드에 전달할 코드 수정 컨텍스트를 RegisterCodeFixesAsync(CodeFixContext) 만듭니다.

CodeFixContext(Document, TextSpan, ImmutableArray<Diagnostic>, Action<CodeAction,ImmutableArray<Diagnostic>>, CancellationToken)

메서드에 전달할 코드 수정 컨텍스트를 RegisterCodeFixesAsync(CodeFixContext) 만듭니다.

CodeFixContext(TextDocument, TextSpan, ImmutableArray<Diagnostic>, Action<CodeAction,ImmutableArray<Diagnostic>>, CancellationToken)

메서드에 전달할 코드 수정 컨텍스트를 RegisterCodeFixesAsync(CodeFixContext) 만듭니다.

CodeFixContext(Document, Diagnostic, Action<CodeAction,ImmutableArray<Diagnostic>>, CancellationToken)

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
Source:
CodeFixContext.cs

메서드에 전달할 코드 수정 컨텍스트를 RegisterCodeFixesAsync(CodeFixContext) 만듭니다.

public:
 CodeFixContext(Microsoft::CodeAnalysis::Document ^ document, Microsoft::CodeAnalysis::Diagnostic ^ diagnostic, Action<Microsoft::CodeAnalysis::CodeActions::CodeAction ^, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^>> ^ registerCodeFix, System::Threading::CancellationToken cancellationToken);
public CodeFixContext (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Diagnostic diagnostic, Action<Microsoft.CodeAnalysis.CodeActions.CodeAction,System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> registerCodeFix, System.Threading.CancellationToken cancellationToken);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public CodeFixContext (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Diagnostic diagnostic, Action<Microsoft.CodeAnalysis.CodeActions.CodeAction,System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> registerCodeFix, System.Threading.CancellationToken cancellationToken);
new Microsoft.CodeAnalysis.CodeFixes.CodeFixContext : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.Diagnostic * Action<Microsoft.CodeAnalysis.CodeActions.CodeAction, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.CodeFixContext
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
new Microsoft.CodeAnalysis.CodeFixes.CodeFixContext : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.Diagnostic * Action<Microsoft.CodeAnalysis.CodeActions.CodeAction, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.CodeFixContext
Public Sub New (document As Document, diagnostic As Diagnostic, registerCodeFix As Action(Of CodeAction, ImmutableArray(Of Diagnostic)), cancellationToken As CancellationToken)

매개 변수

document
Document

수정할 문서입니다.

diagnostic
Diagnostic

수정할 진단입니다. 이 진단의 는 Id 연결된 CodeFixProviderFixableDiagnosticIds 집합에 있어야 합니다.

registerCodeFix
Action<CodeAction,ImmutableArray<Diagnostic>>

위임하여 진단 하위 집합 수정을 등록 CodeAction 합니다.

cancellationToken
CancellationToken

취소 토큰입니다.

특성

예외

인수가 null인 경우 이 예외를 throw합니다.

적용 대상

CodeFixContext(TextDocument, Diagnostic, Action<CodeAction,ImmutableArray<Diagnostic>>, CancellationToken)

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

메서드에 전달할 코드 수정 컨텍스트를 RegisterCodeFixesAsync(CodeFixContext) 만듭니다.

public CodeFixContext (Microsoft.CodeAnalysis.TextDocument document, Microsoft.CodeAnalysis.Diagnostic diagnostic, Action<Microsoft.CodeAnalysis.CodeActions.CodeAction,System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> registerCodeFix, System.Threading.CancellationToken cancellationToken);
new Microsoft.CodeAnalysis.CodeFixes.CodeFixContext : Microsoft.CodeAnalysis.TextDocument * Microsoft.CodeAnalysis.Diagnostic * Action<Microsoft.CodeAnalysis.CodeActions.CodeAction, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.CodeFixContext
Public Sub New (document As TextDocument, diagnostic As Diagnostic, registerCodeFix As Action(Of CodeAction, ImmutableArray(Of Diagnostic)), cancellationToken As CancellationToken)

매개 변수

document
TextDocument

수정할 텍스트 문서입니다.

diagnostic
Diagnostic

수정할 진단입니다. 이 진단의 는 Id 연결된 CodeFixProviderFixableDiagnosticIds 집합에 있어야 합니다.

registerCodeFix
Action<CodeAction,ImmutableArray<Diagnostic>>

위임하여 진단 하위 집합 수정을 등록 CodeAction 합니다.

cancellationToken
CancellationToken

취소 토큰입니다.

예외

인수가 null인 경우 이 예외를 throw합니다.

적용 대상

CodeFixContext(Document, TextSpan, ImmutableArray<Diagnostic>, Action<CodeAction,ImmutableArray<Diagnostic>>, CancellationToken)

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
Source:
CodeFixContext.cs

메서드에 전달할 코드 수정 컨텍스트를 RegisterCodeFixesAsync(CodeFixContext) 만듭니다.

public:
 CodeFixContext(Microsoft::CodeAnalysis::Document ^ document, Microsoft::CodeAnalysis::Text::TextSpan span, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^> diagnostics, Action<Microsoft::CodeAnalysis::CodeActions::CodeAction ^, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^>> ^ registerCodeFix, System::Threading::CancellationToken cancellationToken);
public CodeFixContext (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Text.TextSpan span, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> diagnostics, Action<Microsoft.CodeAnalysis.CodeActions.CodeAction,System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> registerCodeFix, System.Threading.CancellationToken cancellationToken);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public CodeFixContext (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Text.TextSpan span, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> diagnostics, Action<Microsoft.CodeAnalysis.CodeActions.CodeAction,System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> registerCodeFix, System.Threading.CancellationToken cancellationToken);
new Microsoft.CodeAnalysis.CodeFixes.CodeFixContext : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.Text.TextSpan * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> * Action<Microsoft.CodeAnalysis.CodeActions.CodeAction, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.CodeFixContext
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
new Microsoft.CodeAnalysis.CodeFixes.CodeFixContext : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.Text.TextSpan * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> * Action<Microsoft.CodeAnalysis.CodeActions.CodeAction, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.CodeFixContext
Public Sub New (document As Document, span As TextSpan, diagnostics As ImmutableArray(Of Diagnostic), registerCodeFix As Action(Of CodeAction, ImmutableArray(Of Diagnostic)), cancellationToken As CancellationToken)

매개 변수

document
Document

수정할 문서입니다.

span
TextSpan

수정할 내의 document 텍스트 범위입니다.

diagnostics
ImmutableArray<Diagnostic>

수정할 진단입니다. 모든 진단 동일span해야 합니다. 또한 각 진단의 는 Id 연결된 CodeFixProviderFixableDiagnosticIds 집합에 있어야 합니다.

registerCodeFix
Action<CodeAction,ImmutableArray<Diagnostic>>

위임하여 진단 하위 집합 수정을 등록 CodeAction 합니다.

cancellationToken
CancellationToken

취소 토큰입니다.

특성

예외

인수가 null인 경우 이 예외를 throw합니다.

지정된 diagnostics 가 비어 있거나 null 요소가 있거나 범위가 와 같지 않은 요소가 있는 경우 이 예외를 spanthrow합니다.

적용 대상

CodeFixContext(TextDocument, TextSpan, ImmutableArray<Diagnostic>, Action<CodeAction,ImmutableArray<Diagnostic>>, CancellationToken)

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

메서드에 전달할 코드 수정 컨텍스트를 RegisterCodeFixesAsync(CodeFixContext) 만듭니다.

public CodeFixContext (Microsoft.CodeAnalysis.TextDocument document, Microsoft.CodeAnalysis.Text.TextSpan span, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> diagnostics, Action<Microsoft.CodeAnalysis.CodeActions.CodeAction,System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> registerCodeFix, System.Threading.CancellationToken cancellationToken);
new Microsoft.CodeAnalysis.CodeFixes.CodeFixContext : Microsoft.CodeAnalysis.TextDocument * Microsoft.CodeAnalysis.Text.TextSpan * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> * Action<Microsoft.CodeAnalysis.CodeActions.CodeAction, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.CodeFixes.CodeFixContext
Public Sub New (document As TextDocument, span As TextSpan, diagnostics As ImmutableArray(Of Diagnostic), registerCodeFix As Action(Of CodeAction, ImmutableArray(Of Diagnostic)), cancellationToken As CancellationToken)

매개 변수

document
TextDocument

수정할 텍스트 문서입니다.

span
TextSpan

수정할 내의 document 텍스트 범위입니다.

diagnostics
ImmutableArray<Diagnostic>

수정할 진단입니다. 모든 진단 동일span해야 합니다. 또한 각 진단의 는 Id 연결된 CodeFixProviderFixableDiagnosticIds 집합에 있어야 합니다.

registerCodeFix
Action<CodeAction,ImmutableArray<Diagnostic>>

위임하여 진단 하위 집합 수정을 등록 CodeAction 합니다.

cancellationToken
CancellationToken

취소 토큰입니다.

예외

인수가 null인 경우 이 예외를 throw합니다.

지정된 diagnostics 가 비어 있거나 null 요소가 있거나 범위가 와 같지 않은 요소가 있는 경우 이 예외를 spanthrow합니다.

적용 대상