Skip to content

Refactor and simplify ExpressionSyntaxRewriter #153

@PhenX

Description

@PhenX

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityImprove code quality or readability

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions