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

Render enums as strings as opposed to integer values #561

Open
loudenvier opened this issue Mar 9, 2023 · 0 comments
Open

Render enums as strings as opposed to integer values #561

loudenvier opened this issue Mar 9, 2023 · 0 comments

Comments

@loudenvier
Copy link

I'm using a value converter to render enums as strings:

TemplateOptions.Default.ValueConverters.Add((v) => v is Enum e ? $"{e}" : null);

I was wondering if there's an easier (built-in) way (option) to do this or if this solution is the best one.

(And thanks for the AMAZING job! I'm using Fluid very successfully as a way to apply automatic templates to an object in my Object Liquefier project)

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

No branches or pull requests

1 participant