Partilhar via


CompilationWithAnalyzers.IsDiagnosticAnalyzerSuppressed Método

Definição

Cuidado

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

Retornará true se todas as diagnóstico que podem ser produzidas por esse analisador forem suprimidas por meio de opções.

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

Parâmetros

analyzer
DiagnosticAnalyzer

Analisador a ser verificado quanto à supressão.

options
CompilationOptions

Opções de compilação.

onAnalyzerException
Action<Exception,DiagnosticAnalyzer,Diagnostic>

Delegado opcional que é invocado quando um analisador gera uma exceção. O delegado pode realizar tarefas personalizadas, como relatar o diagnóstico de exceção do analisador especificado, relatar um watson não fatal para a exceção etc.

Retornos

Atributos

Aplica-se a