Skip to main content

RtDisplayRuleEvaluator

Namespace: Meshmakers.Octo.Runtime.Contracts.DisplayRules

Evaluates CK display rules (displayNameRule / displayDescriptionRule) against a runtime entity's attributes. Shared by the save-path modifier, the partial-update recompute and the model-import backfill sweep so the resolution semantics stay identical.

public static class RtDisplayRuleEvaluator

Inheritance ObjectRtDisplayRuleEvaluator

Methods

ComputeValue(String, RtTypeWithAttributes)

Computes the display value for a rule, or null when the rule is absent, invalid (rules are validated at model compile time; a stale invalid rule must not block a save) or every referenced attribute is empty.

public static string ComputeValue(string rule, RtTypeWithAttributes source)

Parameters

rule String
The effective rule of the entity's CK type

source RtTypeWithAttributes
The entity providing the attribute values

Returns

String

ResolveAttributePath(RtTypeWithAttributes, String)

Resolves a rule path against an entity's attributes; dot-separated segments traverse record values (RtRecord).

public static object ResolveAttributePath(RtTypeWithAttributes source, string path)

Parameters

source RtTypeWithAttributes

path String

Returns

Object