TestExecutionContext.

GetShortcodeResult(Stream, IEnumerable<KeyValuePair<string, Object>>) Method

Summary

A factory method for use from inside an Wyam.Common.Shortcodes.IShortcode to create an Wyam.Common.Shortcodes.IShortcodeResult.
Assembly
Wyam.Testing.dll
Namespace
Wyam.Testing.Execution
Containing Type
TestExecutionContext

Syntax

public IShortcodeResult GetShortcodeResult(Stream content, IEnumerable<KeyValuePair<string, Object>> metadata = null)

Parameters

Name Type Description
content Stream The content of the shortcode. The passed in stream will be disposed when the shortcode has been rendered. Use Wyam.Common.Execution.IExecutionContext.GetContentStream(System.String) if you need to create a content stream from a string. If you don't want the shortcode to add new content, you can use null for the content stream.
metadata IEnumerable<KeyValuePair<string, Object>> New metadata to be added to the document as a result of executing the shortcode.

Return Value

Type Description
IShortcodeResult A shortcode result.
GitHub