Method FindContentControls
- Namespace
- DocWright.Dom.ContentControls
- Assembly
- DocWright.Dom.dll
FindContentControls(DomNode)
Finds every content control in a subtree, in document order, including controls nested inside other controls.
public static IReadOnlyList<ContentControl> FindContentControls(this DomNode root)
Parameters
rootDomNodeThe subtree root.
Returns
- IReadOnlyList<ContentControl>
The controls found.
Exceptions
- ArgumentNullException
rootis null.
FindContentControls(DomNode, ContentControlKind)
Finds every content control of one kind in a subtree, in document order.
public static IReadOnlyList<ContentControl> FindContentControls(this DomNode root, ContentControlKind kind)
Parameters
rootDomNodeThe subtree root.
kindContentControlKindThe kind to keep.
Returns
- IReadOnlyList<ContentControl>
The matching controls.
Exceptions
- ArgumentNullException
rootis null.