Partager via


CompilationWithAnalyzers.IsDiagnosticAnalyzerSuppressed Méthode

Définition

Attention

This API is no longer supported. See https://github.com/dotnet/roslyn/issues/67592 for details

Retourne true si toutes les diagnostics qui peuvent être produites par cet analyseur sont supprimées par le biais d’options.

public static bool IsDiagnosticAnalyzerSuppressed (Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer analyzer, Microsoft.CodeAnalysis.CompilationOptions options, Action<Exception,Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer,Microsoft.CodeAnalysis.Diagnostic> onAnalyzerException = default);
public static bool IsDiagnosticAnalyzerSuppressed (Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer analyzer, Microsoft.CodeAnalysis.CompilationOptions options, Action<Exception,Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer,Microsoft.CodeAnalysis.Diagnostic>? onAnalyzerException = default);
[System.Obsolete("This API is no longer supported. See https://github.com/dotnet/roslyn/issues/67592 for details")]
public static bool IsDiagnosticAnalyzerSuppressed (Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer analyzer, Microsoft.CodeAnalysis.CompilationOptions options, Action<Exception,Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer,Microsoft.CodeAnalysis.Diagnostic>? onAnalyzerException = default);
static member IsDiagnosticAnalyzerSuppressed : Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer * Microsoft.CodeAnalysis.CompilationOptions * Action<Exception, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, Microsoft.CodeAnalysis.Diagnostic> -> bool
[<System.Obsolete("This API is no longer supported. See https://github.com/dotnet/roslyn/issues/67592 for details")>]
static member IsDiagnosticAnalyzerSuppressed : Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer * Microsoft.CodeAnalysis.CompilationOptions * Action<Exception, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, Microsoft.CodeAnalysis.Diagnostic> -> bool
Public Shared Function IsDiagnosticAnalyzerSuppressed (analyzer As DiagnosticAnalyzer, options As CompilationOptions, Optional onAnalyzerException As Action(Of Exception, DiagnosticAnalyzer, Diagnostic) = Nothing) As Boolean

Paramètres

analyzer
DiagnosticAnalyzer

Analyseur à vérifier pour la suppression.

options
CompilationOptions

Options de compilation.

onAnalyzerException
Action<Exception,DiagnosticAnalyzer,Diagnostic>

Délégué facultatif appelé lorsqu’un analyseur lève une exception. Le délégué peut effectuer des tâches personnalisées telles que signaler le diagnostic d’exception de l’analyseur donné, signaler un watson non fatal pour l’exception, etc.

Retours

Attributs

S’applique à