Method ReplacePlaceholders
ReplacePlaceholders(DomNode, IReadOnlyDictionary<string, object?>, PlaceholderOptions?)
Substitutes every placeholder whose name the values supply.
public static PlaceholderResult ReplacePlaceholders(this DomNode root, IReadOnlyDictionary<string, object?> values, PlaceholderOptions? options = null)
Parameters
rootDomNodeThe document or subtree to fill.
valuesIReadOnlyDictionary<string, object>The values, keyed by placeholder name. A key present with a null value substitutes as empty; a key that is absent is unresolved.
optionsPlaceholderOptionsThe options, or null for the defaults.
Returns
- PlaceholderResult
What the substitution did.
Exceptions
- ArgumentNullException
rootorvaluesis null.- ArgumentException
- InvalidDocumentException
A placeholder had no value and Unresolved is Throw (DXP1004).
- RegexMatchTimeoutException
A match attempt exceeded the one-second default timeout.