Class DocxMailMergeBlockReport
- Namespace
- DocToolkit
- Assembly
- DocToolkit.Docx.dll
What happened when a template's conditional blocks or repeating regions were resolved — which names the template asked for that the caller did not supply, and any structural problem.
public sealed class DocxMailMergeBlockReport
- Inheritance
-
DocxMailMergeBlockReport
- Inherited Members
Remarks
Not DocxMailMergeReport reused: that type's Fields
and MissingFieldNames describe individual
MERGEFIELDs, the wrong shape for "which condition or region names were missing."
Properties
IsComplete
Whether every name the template asked for was supplied. MissingNames.Count == 0.
public bool IsComplete { get; }
Property Value
Issues
Everything the template inspection found, in document order — not filtered to what the call was about.
public IReadOnlyList<DocxMailMergeIssue> Issues { get; }
Property Value
Remarks
Three things are in here that "structural problems" would not lead you to expect, and all three are deliberate.
- Every name in MissingNames appears here too, as its own missing-value entry. MissingNames is the same information in the shape a caller usually wants it.
- Problems belonging to the OTHER construct are here as well: a
MergeConditionalcall reports a repeating block's unmatched marker, and the other way round. - So are problems with ordinary
MERGEFIELDs that have nothing to do with either construct — a malformed instruction, a\b/\f/\vswitch, a Word-nativeNEXTorMERGERECcontrol field.
The strict overloads refuse on a narrower set than this — only issues belonging to the construct being merged. They once refused on the whole of this list, which closed them to any template carrying an unrelated field problem under a message naming the wrong cause. Reporting everything while refusing on what is relevant is the split that fixed it, so do not narrow this list to match the refusal.
MissingNames
The distinct condition or region names the template asked for that the caller did not supply. Each one received a neutral default before merging — see MergeConditionalWithReport(byte[], IReadOnlyDictionary<string, bool>) for what "neutral" means for a condition versus a region.
public IReadOnlyList<string> MissingNames { get; }