Skip to main content
ExhaustiveMatching.Analyzer package icon

ExhaustiveMatching.Analyzer

ExhaustiveMatching.Analyzer adds exhaustive matching to C# switch statements. Get compiler errors for missing cases in a switch statement. Mark which switch statements should have exhaustiveness checking by throwing an exception in the default case. Exhaustiveness checking works not just for enums, but for classes and interfaces. Turn them into discriminated unions (aka sum types) by marking them with the 'Closed' attribute and listing the cases. ExhaustiveMatching.Analyzer goes beyond what other languages support by handling full inheritance hierarchies.

Total Downloads
1.1M
1,095,018
Published
Nov 4, 2019
Latest stable version

Install

.NET CLI
dotnet add package ExhaustiveMatching.Analyzer --version 0.4.0
Package Manager Console
Install-Package ExhaustiveMatching.Analyzer -Version 0.4.0
PackageReference
<PackageReference Include="ExhaustiveMatching.Analyzer" Version="0.4.0" />

Frameworks

No framework metadata available.

Dependencies

No declared dependencies.

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.