GetData(IMarkdownObject, DataKey) Method

Definition

Namespace Markdig.Syntax
Assembly Markdig.dll

Gets the data associated with the specified typed key.

public static T? GetData<T>(this IMarkdownObject markdownObject, DataKey<T> key)

Type parameters

T
Expected data type.

Parameters

markdownObject
IMarkdownObject

The markdown object.

key
DataKey<T>

The typed key to read.

Returns

{T}
The stored value if it matches T; otherwise default.