You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
andcloseBraceChar
would be rolled into this object.The text was updated successfully, but these errors were encountered: