Appearance
StringReflectionExtensions Class
Definition
String extension methods that depend on JASE reflection (template/interpolation resolution of object properties). Separated from StringExtensions so the pure, BCL-only string helpers can live in the dependency-light JASE.Primitives package while these reflection-coupled helpers remain with the reflection layer.
- Namespace:
JASE.Extensions - Assembly:
JASE.ReflectionTools.dll
Methods
| Name | Description |
|---|---|
string Interpolate(string input, object model, bool preserveMissingProperties = null) | Replaces single-brace placeholders {property} with values from model. |
string InterpolateMustache(string input, object model, bool preserveMissingProperties = null, bool htmlEncodeValues = null) | Replaces Mustache-style double-brace placeholders {{property}} with values from model. |
string ResolveMustacheTemplate(string input, object model) | Mustache-style alias for InterpolateMustache — double-brace {{property}}, safe beside HTML/CSS. |
string ResolveTemplate(string input, object model) | Plain-text alias for Interpolate — single-brace {property} only. |
Remarks
Two template doors share one engine: Interpolate / ResolveTemplate — single-brace {property}, plain text only.InterpolateMustache / ResolveMustacheTemplate — double-brace {{property}}, safe beside HTML/CSS. Both accept only identifier / dotted-path tokens with no surrounding whitespace (e.g. name, sfCase.Url; not {{ name }}). Brace content with spaces or : is never treated as a placeholder. “Mustache” here means double-brace property replace only — not Mustache sections, partials, or #/^ logic.