DisplayRuleParser
Namespace: Meshmakers.Octo.ConstructionKit.Contracts.DisplayRules
Parses display rules declared on CK types (displayNameRule / displayDescriptionRule).
A rule is literal text with ${attributePath} placeholders using the established
OctoMesh interpolation dialect, extended with a ?? coalesce operator inside a
placeholder, e.g. "${roomNumber} - ${name ?? globalId}". Attribute paths address
own attributes of the entity including record paths (${record.field}); association
traversal is not supported.
public static class DisplayRuleParser
Inheritance Object → DisplayRuleParser
Methods
ParseCached(String)
Parses a display rule with memoization by rule text. Use this on hot paths (entity save) instead of DisplayRuleParser.ParseCached(String).
public static DisplayRuleParseResult ParseCached(string rule)
Parameters
rule String
The rule text
Returns
Parse(String)
Parses a display rule into literal and placeholder segments. Syntax errors are collected on the result instead of throwing, so callers can report them as model compile messages.
public static DisplayRuleParseResult Parse(string rule)
Parameters
rule String
The rule text, e.g. "${roomNumber} - ${name ?? globalId}"