Class FieldUpdateOptions
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
DATEandTIMEevaluate to. Null leaves both fields on their cached result.
- CreatedDate
Gets or sets the value
CREATEDATEevaluates 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:dirtyare updated. Defaults to false, which updates every field the engine can evaluate.
- DocumentProperties
Gets the document properties
DOCPROPERTY,AUTHOR,TITLE,SUBJECT,KEYWORDS,COMMENTSandLASTSAVEDBYread. Lookup is case-insensitive.
- DocumentVariables
Gets the variables
DOCVARIABLEreads. Lookup is case-insensitive.
- FileDirectory
Gets or sets the directory prepended to
FILENAMEunder its\pswitch, or null.
- FileName
Gets or sets the value
FILENAMEevaluates 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
MERGEFIELDreads. Lookup is case-insensitive. This is the seam mail merge plugs into:DocWright.MailMergefills it with each record's values before it has the remaining fields evaluated, and a caller updating fields without a merge can fill it directly.
- MergeRecordNumber
Gets or sets the value
MERGERECevaluates to, or null.
- MergeSequenceNumber
Gets or sets the value
MERGESEQevaluates to, or null.
- PageNumberAt
Gets or sets what page number a position of the body is laid out on (the text of that page's number), or null: an index (INDEX) then lists its entries without page numbers. An XE field has no bookmark, so this, not PageReference, gives its page. A host without its own map from positions to pages passes
DocWright.Layout.LayoutPositions.PageNumbers(layout)over a layout made with source references.
- PageReference
Gets or sets what a PAGEREF field shows for a bookmark (the text of the page it starts on), or null to keep PAGEREF results as they are. A host with a layout passes
name => layout.FindBookmarkPage(name) is int p ? layout.Pages[p - 1].Info?.PageNumberText : null.
- PrintedDate
Gets or sets the value
PRINTDATEevaluates to, or null.
- SavedDate
Gets or sets the value
SAVEDATEevaluates to, or null.
- TemplateName
Gets or sets the value
TEMPLATEevaluates to, or null.
- UpdateLockedFields
Gets or sets whether fields marked
w:fldLockare updated. Defaults to false, matching Word.
- UserAddress
Gets or sets the value
USERADDRESSevaluates to, or null.
- UserInitials
Gets or sets the value
USERINITIALSevaluates to, or null.
- UserName
Gets or sets the value
USERNAMEevaluates to, or null.