RESTCLIENT.NET
Menu
EN
↗ GitHub

RESTCLIENT.NET / API REFERENCE

Exhaustion.ExhaustionAnalyzer

All API types · Exhaustion · View source

[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ExhaustionAnalyzer : DiagnosticAnalyzer

Analyzer that enforces exhaustive pattern matching for closed type hierarchies.

Members

AnalysisLimitDiagnosticId

public const string AnalysisLimitDiagnosticId = DiagnosticRules.AnalysisLimitDiagnosticId;

Diagnostic ID when exhaustive coverage cannot be determined within the analysis budget.

View source: Exhaustion/ExhaustionAnalyzer.cs:29

DiagnosticId

public const string DiagnosticId = DiagnosticRules.DiagnosticId;

Diagnostic ID for exhaustive pattern matching warnings.

View source: Exhaustion/ExhaustionAnalyzer.cs:24

Initialize

public override void Initialize(AnalysisContext context);

Initializes the analyzer by registering actions for switch expressions and statements.

Parameter Type Default Description
context AnalysisContext Required The analysis context.

View source: Exhaustion/ExhaustionAnalyzer.cs:41

SupportedDiagnostics

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }

Gets the collection of diagnostic descriptors supported by this analyzer.

View source: Exhaustion/ExhaustionAnalyzer.cs:34