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

Additional formatting options. #27

Open
crozone opened this issue Jun 23, 2021 · 0 comments
Open

Additional formatting options. #27

crozone opened this issue Jun 23, 2021 · 0 comments
Milestone

Comments

@crozone
Copy link
Owner

crozone commented Jun 23, 2021

As FormatWith gains features, additional options to control how formatting is performed will be required.

Control over disabling property and indexer navigations.

Property navigations, and soon indexers (#26), are supported in property keys.
In these situations, FormatWith will use reflection to introspect the input object and retrieve the required value.

However, a use-case for FormatWith is handling untrusted string inputs. For security reasons, it is desirable to be able to disable these features so that unstrusted inputs cannot navigate to properties that are not anticipated.

Additional templating formats

We may want to support additional templating styles and formats, such as multi-character start and end brackets (#24), or formats like mustache.js (#11). Selecting which format is desired will necessarily require another configuration option.

Options object

As FormatWith grows in complexity it will be desirable to encapsulate the format options into a dedicated object/struct and pass it in as a dedicated parameter, in order to reduce the number of parameters that .FormatWith() is called with.

Parameters like the openBraceChar and closeBraceChar would be rolled into this object.

@crozone crozone added this to the 4.0 milestone Jun 23, 2021
@crozone crozone changed the title Additional additional formatting options. Additional formatting options. Jun 23, 2021
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