Table of Contents

Class FieldEvaluationContext

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

One field being evaluated, and everything a handler may read while evaluating it.

public sealed class FieldEvaluationContext
Inheritance
FieldEvaluationContext
Inherited Members

Properties

CachedResult

Gets the field's current cached result. Never null; empty when there is none.

Culture

Gets the culture for parsing and formatting. Never the ambient thread culture.

Depth

Gets the field's nesting depth; a top-level field is at depth 0.

Document

Gets the document being updated, or null when a subtree was updated on its own.

Instruction

Gets the parsed instruction, with nested field results already substituted.

Options

Gets the update options, including every ambient value the engine may use.

Paragraph

Gets the paragraph holding the field's begin character, or null.

Methods

EvaluateNested(FieldInstruction)

Evaluates a nested instruction, honouring the configured nesting limit.

Report(string, string)

Reports a diagnostic against the configured sink.

SetBookmarkValue(string, string)

Binds a name as a SET field would, so later REF fields in the same update see it.

TryGetBookmarkText(string, out string?)

Looks up a name bound by a SET field earlier in the update, falling back to a document bookmark of that name.