DiagnosticAnalyzerExtensions.WithAnalyzers Methode

Definition

Überlädt

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions)

Gibt eine neue Kompilierung mit angefügten Diagnoseanalysetools zurück.

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions)

Gibt eine neue Kompilierung mit angefügten Diagnoseanalysetools zurück.

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

Gibt eine neue Kompilierung mit angefügten Diagnoseanalysetools zurück.

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions)

Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs

Gibt eine neue Kompilierung mit angefügten Diagnoseanalysetools zurück.

C#
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);

Parameter

compilation
Compilation

Kompilierung, zu der Analysetools hinzugefügt werden sollen.

analyzers
ImmutableArray<DiagnosticAnalyzer>

Der Satz von Analysetools, die in zukünftige Analysen einbezogen werden sollen.

options
AnalyzerOptions

Optionen, die an Analysetools übergeben werden.

Gibt zurück

Gilt für:

Roslyn 4.13.0 und andere Versionen
Produkt Versionen
Roslyn 4.8.0, 4.9.2, 4.12.2, 4.13.0

WithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions)

Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs

Gibt eine neue Kompilierung mit angefügten Diagnoseanalysetools zurück.

C#
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);

Parameter

compilation
Compilation

Kompilierung, zu der Analysetools hinzugefügt werden sollen.

analyzers
ImmutableArray<DiagnosticAnalyzer>

Der Satz von Analysetools, die in zukünftige Analysen einbezogen werden sollen.

analysisOptions
CompilationWithAnalyzersOptions

Optionen zum Konfigurieren der Analyseausführung in CompilationWithAnalyzers.

Gibt zurück

Gilt für:

Roslyn 4.13.0 und andere Versionen
Produkt Versionen
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0

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

Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs
Quelle:
DiagnosticAnalyzerExtensions.cs

Achtung

Use WithAnalyzers overload without a cancellation token

Gibt eine neue Kompilierung mit angefügten Diagnoseanalysetools zurück.

C#
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);
C#
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);
C#
[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);

Parameter

compilation
Compilation

Kompilierung, zu der Analysetools hinzugefügt werden sollen.

analyzers
ImmutableArray<DiagnosticAnalyzer>

Der Satz von Analysetools, die in zukünftige Analysen einbezogen werden sollen.

options
AnalyzerOptions

Optionen, die an Analysetools übergeben werden.

cancellationToken
CancellationToken

Ein Abbruchtoken, das zum Abbrechen der Analyse verwendet werden kann.

Gibt zurück

Attribute

Gilt für:

Roslyn 4.13.0 und andere Versionen
Produkt Versionen (Veraltet)
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0 (4.8.0, 4.9.2, 4.12.2, 4.13.0)