Execute.

Execute(DocumentConfig, bool) Constructor

Summary

Specifies a delegate that should be invoked once for each input document. If the delegate returns a IEnumerable<IDocument> or Wyam.Common.Documents.IDocument, the document(s) will be the output(s) of this module. If the delegate returns a IEnumerable<IModule> or Wyam.Common.Modules.IModule, the module(s) will be executed with each input document as their input and the results will be the output of this module. If the delegate returns null, this module will just output the input document. If anything else is returned, the input document will be output with the string value of the delegate result as it's content.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.Extensibility
Containing Type
Execute

Syntax

public Execute(DocumentConfig execute, bool parallel = true)

Parameters

Name Type Description
execute DocumentConfig A delegate to invoke that should return a IEnumerable<IDocument>, Wyam.Common.Documents.IDocument, IEnumerable<IModule>, Wyam.Common.Modules.IModule, object, or null.
parallel bool The delegate is usually evaluated and each input document is processed in parallel. Setting this to false runs evaluates and processes each document in their original input order.

Return Value

Type Description
void
GitHub