Summary
Executes custom code that returns documents, modules, or new content.
- Assembly
- Wyam
.Core .dll - Namespace
- Wyam
.Core .Modules .Extensibility - Interfaces
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Wyam.Common.Modules/IModule"
Type["Execute"]
class Type type-node
Syntax
public class Execute : IModule
Remarks
This module is very useful for customizing pipeline execution without having to write an entire module.
Returning modules from the delegate is also useful for customizing existing modules based on the
current set of documents. For example, you can use this module to execute the
Wyam.Core.Modules.Contents.Replace
module
with customized search strings based on the results of other pipelines.
Constructors
Name | Summary |
---|---|
Execute |
Specifies a delegate that should be invoked once for each input document. The output from this module will be the input documents. |
Execute |
Specifies a delegate that should be invoked once for all input documents. The output from this module will be the input documents. |
Execute |
Specifies a delegate that should be invoked once for all input documents. 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 the input documents 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 documents. If anything else is returned, an exception will be thrown.
|
Execute |
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.
|
Execute |
Specifies a delegate that should be invoked for all input documents. 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 null or anything else, this module will just output the input documents.
The third parameter of the delegate is primarly to aid overload resolution between this and the other constructors.
The value null will be passed for now, though it might be used for something else in a future version.
|