DiagnosticAnalyzerExtensions.WithAnalyzers Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions) |
Retourne une nouvelle compilation avec des analyseurs de diagnostic attachés. |
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions) |
Retourne une nouvelle compilation avec des analyseurs de diagnostic attachés. |
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, CancellationToken) |
Obsolète.
Retourne une nouvelle compilation avec des analyseurs de diagnostic attachés. |
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions)
Retourne une nouvelle compilation avec des analyseurs de diagnostic attachés.
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
Paramètres
- compilation
- Compilation
Compilation à laquelle les analyseurs doivent être ajoutés.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
Ensemble d’analyseurs à inclure dans les analyses futures.
- options
- AnalyzerOptions
Options passées aux analyseurs.
Retours
S’applique à
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions)
Retourne une nouvelle compilation avec des analyseurs de diagnostic attachés.
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
Paramètres
- compilation
- Compilation
Compilation à laquelle les analyseurs doivent être ajoutés.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
Ensemble d’analyseurs à inclure dans les analyses futures.
- analysisOptions
- CompilationWithAnalyzersOptions
Options de configuration de l’exécution de l’analyseur dans CompilationWithAnalyzers.
Retours
S’applique à
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, CancellationToken)
Attention
Use WithAnalyzers overload without a cancellation token
Retourne une nouvelle compilation avec des analyseurs de diagnostic attachés.
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
Paramètres
- compilation
- Compilation
Compilation à laquelle les analyseurs doivent être ajoutés.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
Ensemble d’analyseurs à inclure dans les analyses futures.
- options
- AnalyzerOptions
Options passées aux analyseurs.
- cancellationToken
- CancellationToken
Jeton d’annulation qui peut être utilisé pour abandonner l’analyse.
Retours
- Attributs