This class has become huge, it is time to simplify it.
I suggest this :
- Create EnumMethodExpander.cs - extract TryExpandEnumMethodCall and CreateMethodCallOnEnumValue
- Create SwitchExpressionRewriter.cs - extract VisitSwitchExpression and ReplaceVariableWithCast
- Create NullConditionalRewriter.cs - extract logic for null coalesce operators
- Simplify main file and delegate to these new classes
- Use file-scoped namespace
- All existing tests must still pass exactly the same
This class has become huge, it is time to simplify it.
I suggest this :