MarkdownObjectExtensions Class

Extensions for visiting Block or Inline

public static class MarkdownObjectExtensions

Methods

NameDescription
Descendants(MarkdownObject)Iterates over the descendant elements for the specified markdown element, including Block and Inline. The descendant elements are returned in DFS-like order.
Descendants<T>(ContainerBlock)Iterates over the descendant elements for the specified markdown Block element and filters by the type T.
Descendants<T>(ContainerInline)Iterates over the descendant elements for the specified markdown Inline element and filters by the type T.
Descendants<T>(MarkdownObject)Iterates over the descendant elements for the specified markdown element, including Block and Inline and filters by the type T. The descendant elements are returned in DFS-like order.

Descendants overloads

Descendants(MarkdownObject)

MarkdownObjectExtensions.cs

Iterates over the descendant elements for the specified markdown element, including Block and Inline.

The descendant elements are returned in DFS-like order.

public static IEnumerable<MarkdownObject> Descendants(this MarkdownObject markdownObject)
Parameters
markdownObject MarkdownObject
The markdown object.
Returns

IEnumerable<MarkdownObject> An iteration over the descendant elements

Descendants<T>(ContainerBlock)

MarkdownObjectExtensions.cs

Iterates over the descendant elements for the specified markdown Block element and filters by the type T.

public static IEnumerable<T> Descendants<T>(this ContainerBlock block) where T : Block
Type parameters
T
Type to use for filtering the descendants
Parameters
block ContainerBlock
The markdown object.
Returns

IEnumerable<T> An iteration over the descendant elements

Descendants<T>(ContainerInline)

MarkdownObjectExtensions.cs

Iterates over the descendant elements for the specified markdown Inline element and filters by the type T.

public static IEnumerable<T> Descendants<T>(this ContainerInline inline) where T : Inline
Type parameters
T
Type to use for filtering the descendants
Parameters
inline ContainerInline
The inline markdown object.
Returns

IEnumerable<T> An iteration over the descendant elements

Descendants<T>(MarkdownObject)

MarkdownObjectExtensions.cs

Iterates over the descendant elements for the specified markdown element, including Block and Inline and filters by the type T.

The descendant elements are returned in DFS-like order.

public static IEnumerable<T> Descendants<T>(this MarkdownObject markdownObject) where T : MarkdownObject
Type parameters
T
Type to use for filtering the descendants
Parameters
markdownObject MarkdownObject
The markdown object.
Returns

IEnumerable<T> An iteration over the descendant elements