DiagnosticAnalyzerExtensions.WithAnalyzers Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions) |
Restituisce una nuova compilazione con analizzatori di diagnostica associati. |
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions) |
Restituisce una nuova compilazione con analizzatori di diagnostica associati. |
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, CancellationToken) |
Obsoleti.
Restituisce una nuova compilazione con analizzatori di diagnostica associati. |
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions)
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
Restituisce una nuova compilazione con analizzatori di diagnostica associati.
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
Parametri
- compilation
- Compilation
Compilazione in cui aggiungere gli analizzatori.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
Set di analizzatori da includere nelle analisi future.
- options
- AnalyzerOptions
Opzioni passate agli analizzatori.
Restituisce
Si applica a
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions)
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
Restituisce una nuova compilazione con analizzatori di diagnostica associati.
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
Parametri
- compilation
- Compilation
Compilazione in cui aggiungere gli analizzatori.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
Set di analizzatori da includere nelle analisi future.
- analysisOptions
- CompilationWithAnalyzersOptions
Opzioni per configurare l'esecuzione dell'analizzatore all'interno di CompilationWithAnalyzers.
Restituisce
Si applica a
WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, CancellationToken)
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
- Origine:
- DiagnosticAnalyzerExtensions.cs
Attenzione
Use WithAnalyzers overload without a cancellation token
Restituisce una nuova compilazione con analizzatori di diagnostica associati.
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
Parametri
- compilation
- Compilation
Compilazione in cui aggiungere gli analizzatori.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
Set di analizzatori da includere nelle analisi future.
- options
- AnalyzerOptions
Opzioni passate agli analizzatori.
- cancellationToken
- CancellationToken
Token di annullamento che può essere usato per interrompere l'analisi.
Restituisce
- Attributi