Table of Contents

Method UpdateFields

Namespace
DocWright.Dom.Fields
Assembly
DocWright.Dom.dll

UpdateFields(DomNode, FieldUpdateOptions?)

Evaluates every field in a subtree and writes each result between the field's separator and end characters.

public static FieldUpdateResult UpdateFields(this DomNode root, FieldUpdateOptions? options = null)

Parameters

root DomNode

The document or subtree to update.

options FieldUpdateOptions

The update options, or null for defaults.

Returns

FieldUpdateResult

A summary of what changed.

Remarks

Nested fields evaluate innermost-first. A field the engine cannot evaluate keeps its cached result and reports a diagnostic — it is never blanked. Fields marked w:fldLock are left alone unless UpdateLockedFields says otherwise.

Exceptions

ArgumentNullException

root is null.

ResourceLimitExceededException

Field nesting exceeded MaxNestingDepth.