📄️ Analyzers Overview
UnionGenerator includes powerful Roslyn analyzers that provide compile-time safety and help you write better union code. These analyzers catch common mistakes, ensure exhaustive pattern matching, and suggest improvements.
📄️ Pattern Matching Analyzers
Pattern matching analyzers ensure exhaustive case handling in switch expressions, switch statements, and Match() calls. They prevent runtime exceptions caused by unhandled union cases.
📄️ Factory Method Analyzers
Factory method analyzers validate union type definitions, ensuring factory methods follow supported patterns and detecting common mistakes during union declaration.
📄️ Code Fixes
UnionGenerator provides automatic code fixes that help you quickly resolve analyzer warnings. These refactorings appear as light bulb suggestions in your IDE.
📄️ ASP.NET Core Analyzers
Specialized analyzers for ASP.NET Core integration that detect common misuse patterns when using union types in controllers and minimal APIs.