Table of Contents

Method FindPlaceholderNames

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

FindPlaceholderNames(DomNode, PlaceholderOptions?)

Lists the placeholder names a template asks for, without substituting anything.

public static IReadOnlyList<string> FindPlaceholderNames(this DomNode root, PlaceholderOptions? options = null)

Parameters

root DomNode

The document or subtree to inspect.

options PlaceholderOptions

The options, or null for the defaults.

Returns

IReadOnlyList<string>

The distinct names, ordered.

Remarks

Available separately so a host can check its data covers the template before it fills one — which is while the author is still looking at it, rather than after a document has gone out with {{Name}} printed in it.

Exceptions

ArgumentNullException

root is null.

ArgumentException

Prefix or Suffix is empty.