ExecuteAsync(KeyValuePair<string, string>[], string, IDocument, IExecutionContext) Method
Executes the shortcode and returns an IDocument with the shortcode result content and metadata.

Syntax

public abstract Task<IEnumerable<ShortcodeResult>> ExecuteAsync(KeyValuePair<string, string>[] args, string content, IDocument document, IExecutionContext context)

Parameters

Name Type Description
args KeyValuePair<string, string>[] The arguments declared with the shortcode. This contains a list of key-value pairs in the order they appeared in the shortcode declaration. If no key was specified, then the System.Collections.Generic.KeyValuePair`2.Key property will be null.
content string The content of the shortcode.
document IDocument The current document (including metadata from previous shortcodes in the same document).
context IExecutionContext The current execution context.

Return Value

Type Description
Task<IEnumerable<ShortcodeResult>> A collection of shortcode results or null to remove the shortcode from the document without adding replacement content.