ExhaustiveMatching.Analyzer NuGet Package

ExhaustiveMatching.Analyzer adds exhaustive matching to C# switch statements and expressions.

Get compiler errors for missing cases in a switch statement or expression.

Mark which switches 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.




Got any ExhaustiveMatching.Analyzer Question?





Info

Version: 0.5.0
Author(s): Jeff Walker
Last Update: Tuesday, May 26, 2020
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/WalkerCodeRanger/ExhaustiveMatching
NuGet Url: https://www.nuget.org/packages/ExhaustiveMatching.Analyzer


Install
Install-Package ExhaustiveMatching.Analyzer
dotnet add package ExhaustiveMatching.Analyzer
paket add ExhaustiveMatching.Analyzer
ExhaustiveMatching.Analyzer Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

1.3

avg-downloads-per-day

25

days-since-last-release

1425