다음을 통해 공유


DiagnosticAnalyzerExtensions.WithAnalyzers 메서드

정의

오버로드

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions)

연결된 진단 분석기를 사용하여 새 컴파일을 반환합니다.

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions)

연결된 진단 분석기를 사용하여 새 컴파일을 반환합니다.

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, CancellationToken)
사용되지 않음.

연결된 진단 분석기를 사용하여 새 컴파일을 반환합니다.

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions)

Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs

연결된 진단 분석기를 사용하여 새 컴파일을 반환합니다.

public static Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers WithAnalyzers (this Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions? options = default);
static member WithAnalyzers : Microsoft.CodeAnalysis.Compilation * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions -> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers
<Extension()>
Public Function WithAnalyzers (compilation As Compilation, analyzers As ImmutableArray(Of DiagnosticAnalyzer), Optional options As AnalyzerOptions = Nothing) As CompilationWithAnalyzers

매개 변수

compilation
Compilation

분석기를 추가할 컴파일입니다.

analyzers
ImmutableArray<DiagnosticAnalyzer>

향후 분석에 포함할 분석기 집합입니다.

options
AnalyzerOptions

분석기로 전달되는 옵션입니다.

반환

적용 대상

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions)

Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs

연결된 진단 분석기를 사용하여 새 컴파일을 반환합니다.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::CodeAnalysis::Diagnostics::CompilationWithAnalyzers ^ WithAnalyzers(Microsoft::CodeAnalysis::Compilation ^ compilation, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostics::DiagnosticAnalyzer ^> analyzers, Microsoft::CodeAnalysis::Diagnostics::CompilationWithAnalyzersOptions ^ analysisOptions);
public static Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers WithAnalyzers (this Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersOptions analysisOptions);
static member WithAnalyzers : Microsoft.CodeAnalysis.Compilation * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersOptions -> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers
<Extension()>
Public Function WithAnalyzers (compilation As Compilation, analyzers As ImmutableArray(Of DiagnosticAnalyzer), analysisOptions As CompilationWithAnalyzersOptions) As CompilationWithAnalyzers

매개 변수

compilation
Compilation

분석기를 추가할 컴파일입니다.

analyzers
ImmutableArray<DiagnosticAnalyzer>

향후 분석에 포함할 분석기 집합입니다.

analysisOptions
CompilationWithAnalyzersOptions

내에서 CompilationWithAnalyzers분석기 실행을 구성하는 옵션입니다.

반환

적용 대상

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, CancellationToken)

Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs
Source:
DiagnosticAnalyzerExtensions.cs

주의

Use WithAnalyzers overload without a cancellation token

연결된 진단 분석기를 사용하여 새 컴파일을 반환합니다.

public static Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers WithAnalyzers (this Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions options = default, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers WithAnalyzers (this Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("Use WithAnalyzers overload without a cancellation token", false)]
public static Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers WithAnalyzers (this Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions? options, System.Threading.CancellationToken cancellationToken);
static member WithAnalyzers : Microsoft.CodeAnalysis.Compilation * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
[<System.Obsolete("Use WithAnalyzers overload without a cancellation token", false)>]
static member WithAnalyzers : Microsoft.CodeAnalysis.Compilation * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers
<Extension()>
Public Function WithAnalyzers (compilation As Compilation, analyzers As ImmutableArray(Of DiagnosticAnalyzer), Optional options As AnalyzerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As CompilationWithAnalyzers
<Extension()>
Public Function WithAnalyzers (compilation As Compilation, analyzers As ImmutableArray(Of DiagnosticAnalyzer), options As AnalyzerOptions, cancellationToken As CancellationToken) As CompilationWithAnalyzers

매개 변수

compilation
Compilation

분석기를 추가할 컴파일입니다.

analyzers
ImmutableArray<DiagnosticAnalyzer>

향후 분석에 포함할 분석기 집합입니다.

options
AnalyzerOptions

분석기로 전달되는 옵션입니다.

cancellationToken
CancellationToken

분석을 중단하는 데 사용할 수 있는 취소 토큰입니다.

반환

특성

적용 대상