Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value raw #21

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Conversation

fnajera-rac-de
Copy link

Add property DefaultValueRaw

The "magic" behavior of DefaultValue for string types is
very helpful for most scenarios, but it makes one scenario
particularly difficult: if you want to use a string field/const
as default value for a string autobindable property.
See test case "Create_With_DefaultValue_As_String_Code"

This change adds an extra property DefaultValueRaw
which is always written as-is in the generated code, no matter
of what type the property has.

Fernando P. Najera Cano added 2 commits September 14, 2023 13:15
The "magic" behavior of DefaultValue for string types is
very helpful for most scenarios, but it makes one scenario
particularly difficult: if you want to use a string field/const
as default value for a string autobindable property.
See test case "Create_With_DefaultValue_As_String_Code"

This change adds an extra property DefaultValueRaw
which is always written as-is in the generated code, no matter
of what type the property has.
@rrmanzano
Copy link
Owner

Hi @fnajera-rac-de that is great !! thanks for your contribution. In the next version, I will add some documentation related to this

@rrmanzano rrmanzano merged commit 418ede6 into rrmanzano:main Dec 20, 2023
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.

2 participants