Skip to content

Add Fraction/decimal/double/int From overloads to codegen template#76

Open
Selene29 wants to merge 1 commit intoMadsKirkFoged:masterfrom
Selene29:from-overloads-template
Open

Add Fraction/decimal/double/int From overloads to codegen template#76
Selene29 wants to merge 1 commit intoMadsKirkFoged:masterfrom
Selene29:from-overloads-template

Conversation

@Selene29
Copy link

@Selene29 Selene29 commented Mar 7, 2026

Summary

  • Adds From factory method overloads for all number types (Fraction, decimal, double, int) to the UnitGenerator template
  • Each type also gets a nullable variant with [NotNullIfNotNull] attribute
  • Order matches the existing constructor order: Fraction, decimal, double, int

Template change only — no generated files are modified.

Adds From overloads for all number types (Fraction, decimal, double, int)
plus their nullable variants to the UnitGenerator template, matching the
constructor order. All generated unit classes will support these factory
method overloads.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant