Compartir a través de


CompilationWithAnalyzers.IsDiagnosticAnalyzerSuppressed Método

Definición

Precaución

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

Devuelve true si todos los diagnósticos que puede generar este analizador se suprimen a través de opciones.

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

Analizador que se va a comprobar para supresión.

options
CompilationOptions

Opciones de compilación.

onAnalyzerException
Action<Exception,DiagnosticAnalyzer,Diagnostic>

Delegado opcional que se invoca cuando un analizador produce una excepción. El delegado puede realizar tareas personalizadas, como notificar el diagnóstico de excepciones del analizador determinado, notificar un watson no grave para la excepción, etc.

Devoluciones

Atributos

Se aplica a