Skip to content

Additional formatting options. #27

@crozone

Description

@crozone

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions