fix(C#): Enhance number handling in SystemTextJsonCSharpRenderer by mikecrowe-otp · Pull Request #2805 · glideapps/quicktype

Description

  • Added support for handling both integer and double types in a union case.
  • Introduced a variable generator to manage variable naming dynamically.
  • Updated decoder transformer cases to accommodate the new logic for number types.
  • Ensured backward compatibility for existing single type handling.

Related Issue

Fixes #2804

Motivation and Context

C# code would not compile

Previous Behaviour / Output

error CS0152: The switch statement contains multiple cases with the label value '8'

New Behaviour / Output

Code compiles

How Has This Been Tested?

In our production code

Screenshots (if appropriate):