Table of Contents

Class FieldUpdateOptions

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

Everything a field update needs from outside the document.

public sealed class FieldUpdateOptions
Inheritance
FieldUpdateOptions
Inherited Members

Remarks

DATE, TIME, FILENAME and USERNAME are ambient by nature, and the repository forbids ambient values in output — two runs of the same conversion must produce identical bytes. So there is no DateTime.Now anywhere in the field engine: every ambient value is supplied here, and a value that is not supplied makes its field unevaluatable rather than defaulting to the machine's state.

Document metadata is supplied here for the same reason and one more: the DOM has no core-properties surface, so AUTHOR and its siblings have nowhere else to read from.

Constructors

FieldUpdateOptions()

Initializes options with an invariant culture and no ambient values.

Properties

Clock

Gets or sets the value DATE and TIME evaluate to. Null leaves both fields on their cached result.

CreatedDate

Gets or sets the value CREATEDATE evaluates to, or null.

Culture

Gets or sets the culture used to parse and format field results. Defaults to InvariantCulture — never the ambient thread culture.

Diagnostics

Gets or sets the sink for structured diagnostics, or null to discard them.

DirtyFieldsOnly

Gets or sets whether only fields marked w:dirty are updated. Defaults to false, which updates every field the engine can evaluate.

DocumentProperties

Gets the document properties DOCPROPERTY, AUTHOR, TITLE, SUBJECT, KEYWORDS, COMMENTS and LASTSAVEDBY read. Lookup is case-insensitive.

DocumentVariables

Gets the variables DOCVARIABLE reads. Lookup is case-insensitive.

FileDirectory

Gets or sets the directory prepended to FILENAME under its \p switch, or null.

FileName

Gets or sets the value FILENAME evaluates to, or null.

Handlers

Gets or sets host-supplied field handlers, or null for the built-in set only.

MaxNestingDepth

Gets or sets the maximum depth of nested fields. Exceeding it throws ResourceLimitExceededException. Defaults to 20.

MergeData

Gets the current merge record's fields, which MERGEFIELD reads. Lookup is case-insensitive. Mail merge itself is a later phase; this is the seam it plugs into.

MergeRecordNumber

Gets or sets the value MERGEREC evaluates to, or null.

MergeSequenceNumber

Gets or sets the value MERGESEQ evaluates to, or null.

PrintedDate

Gets or sets the value PRINTDATE evaluates to, or null.

SavedDate

Gets or sets the value SAVEDATE evaluates to, or null.

TemplateName

Gets or sets the value TEMPLATE evaluates to, or null.

UpdateLockedFields

Gets or sets whether fields marked w:fldLock are updated. Defaults to false, matching Word.

UserAddress

Gets or sets the value USERADDRESS evaluates to, or null.

UserInitials

Gets or sets the value USERINITIALS evaluates to, or null.

UserName

Gets or sets the value USERNAME evaluates to, or null.