An abstract base for modules that execute children and then combine the results with the
input documents in some way.
- Namespace
- Statiq
.Common - Interfaces
- Base Types
-
- object
- Module
- ParentModule
- Derived Types
graph BT
Type-->Base0["ParentModule"]
click Base0 "/api/Statiq.Common/ParentModule"
Base0-->Base1["Module"]
click Base1 "/api/Statiq.Common/Module"
Base1-->Base2["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type-.->Interface1["IEnumerable<IModule>"]
Type-.->Interface2["IEnumerable"]
Type["ChildDocumentsModule"]
class Type type-node
Derived0["AddContentToMetadata"]-->Type
click Derived0 "/api/Statiq.Core/AddContentToMetadata"
Derived1["SyncChildDocumentsModule"]-->Type
click Derived1 "/api/Statiq.Common/SyncChildDocumentsModule"
Syntax
public abstract class ChildDocumentsModule : ParentModule, IModule, IEnumerable<IModule>,
IEnumerable
Remarks
The child modules are executed once and the original input documents
are passed to the child modules. Wrap the child modules with a
ForEachDocument
module to execute the child modules for each input document individually. Add a
ClearDocuments
module as the first child if the original input documents
should not be passed to the child modules.
Constructors
Name | Summary |
---|---|
ChildDocumentsModule |
Executes the specified modules to get result documents. |
Properties
Name | Property Type | Summary |
---|---|---|
Children | ModuleList |
The children of this module.
Inherited from ParentModule
|
Methods
Name | Return Value | Summary |
---|---|---|
Add |
void |
Adds modules as a child of this module.
Inherited from ParentModule
|
AfterExecution |
void |
Called after each module execution.
Inherited from Module
|
AfterExecutionAsync |
Task |
Called after each module execution.
Inherited from Module
|
BeforeExecution |
void |
Called before each module execution.
Inherited from Module
|
BeforeExecutionAsync |
Task |
Called before each module execution.
Inherited from Module
|
ExecuteAsync |
Task |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
|
ExecuteChildrenAsync |
Task |
Gets the output documents given the input documents and the output documents from the execution of child modules.
|
ExecuteContextAsync |
Task |
Executes the module once for all input documents.
|
ExecuteInputAsync |
Task |
Executes the module.
|
Finally |
void |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
FinallyAsync |
Task |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
GetEnumerator |
IEnumerator |
Inherited from ParentModule
|